diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:15:33 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-05-26 08:54:48 -0600 |
commit | 91665b29d6963c60e851bd7e33342ae4f073d727 (patch) | |
tree | b9818b0597e7fb4ed59eaa1de98ab2689e5a0ea2 /drivers/char | |
parent | fb4ba280fadc15c9f6e498f73c01dd24d3fcc692 (diff) |
apm-emulation: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/apm-emulation.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index cdd876dbb2b0..da8a1658a273 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/poll.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/miscdevice.h> @@ -416,6 +417,7 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; + lock_kernel(); as = kzalloc(sizeof(*as), GFP_KERNEL); if (as) { /* @@ -435,6 +437,7 @@ static int apm_open(struct inode * inode, struct file * filp) filp->private_data = as; } + unlock_kernel(); return as ? 0 : -ENOMEM; } |