From: Jonathan Corbet Date: Thu, 15 May 2008 16:25:44 +0000 (-0600) Subject: HID: cdev lock_kernel() pushdown X-Git-Tag: v2.6.27-rc1~1103^2~132 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=702e57d9ef7002f8d362faa6ddebc59e6d43fa05;p=linux-2.6-omap-h63xx.git HID: cdev lock_kernel() pushdown Signed-off-by: Jonathan Corbet --- diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 1ca6f4635ee..2fde6c63f47 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -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; }