diff --git a/[refs] b/[refs] index 491260915e56..b81be7917770 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f439647a4072ec64bb2e4b9290cd7be6aee8328 +refs/heads/master: 309c4551c0fa0897d5343c36cbfbfa39f1f41b88 diff --git a/trunk/drivers/char/misc.c b/trunk/drivers/char/misc.c index eaace0db0ff4..6e1563c3d30a 100644 --- a/trunk/drivers/char/misc.c +++ b/trunk/drivers/char/misc.c @@ -49,6 +49,7 @@ #include #include #include +#include /* * Head entry for the doubly linked miscdevice list @@ -118,6 +119,7 @@ static int misc_open(struct inode * inode, struct file * file) int err = -ENODEV; const struct file_operations *old_fops, *new_fops = NULL; + lock_kernel(); mutex_lock(&misc_mtx); list_for_each_entry(c, &misc_list, list) { @@ -155,6 +157,7 @@ static int misc_open(struct inode * inode, struct file * file) fops_put(old_fops); fail: mutex_unlock(&misc_mtx); + unlock_kernel(); return err; }