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:
72b6704
)
HID: cdev lock_kernel() pushdown
author
Jonathan Corbet
<corbet@lwn.net>
Thu, 15 May 2008 16:25:44 +0000
(10:25 -0600)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:47 +0000
(14:05 -0600)
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/hid/hidraw.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hidraw.c
b/drivers/hid/hidraw.c
index 1ca6f4635eeb3e0474abada594892ac5683ce7ba..2fde6c63f47dffa2d89c224cd15c1be215d4d20e 100644
(file)
--- a/
drivers/hid/hidraw.c
+++ b/
drivers/hid/hidraw.c
@@
-30,6
+30,7
@@
#include <linux/major.h>
#include <linux/hid.h>
#include <linux/mutex.h>
+#include <linux/smp_lock.h>
#include <linux/hidraw.h>
@@
-157,6
+158,7
@@
static int hidraw_open(struct inode *inode, struct file *file)
struct hidraw_list *list;
int err = 0;
+ lock_kernel();
if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) {
err = -ENOMEM;
goto out;
@@
-183,6
+185,7
@@
static int hidraw_open(struct inode *inode, struct file *file)
out_unlock:
spin_unlock(&minors_lock);
out:
+ unlock_kernel();
return err;
}