projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3369c6
)
gdth: cdev lock_kernel() pushdown
author
Jonathan Corbet
<corbet@lwn.net>
Thu, 15 May 2008 22:09:48 +0000
(16:09 -0600)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:49 +0000
(14:05 -0600)
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/scsi/gdth.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/gdth.c
b/drivers/scsi/gdth.c
index 46771d4c81bdcd8abeb8bad9b81bdd6430f5dfff..822d5214692bfe3663b5acb8987ffec5a0ec0cd5 100644
(file)
--- a/
drivers/scsi/gdth.c
+++ b/
drivers/scsi/gdth.c
@@
-120,6
+120,7
@@
#include <linux/timer.h>
#include <linux/dma-mapping.h>
#include <linux/list.h>
+#include <linux/smp_lock.h>
#ifdef GDTH_RTC
#include <linux/mc146818rtc.h>
@@
-4019,10
+4020,12
@@
static int gdth_open(struct inode *inode, struct file *filep)
{
gdth_ha_str *ha;
+ lock_kernel();
list_for_each_entry(ha, &gdth_instances, list) {
if (!ha->sdev)
ha->sdev = scsi_get_host_dev(ha->shost);
}
+ unlock_kernel();
TRACE(("gdth_open()\n"));
return 0;