From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:33 +0000 (+0200) Subject: apm-emulation: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~80 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2861ead38b8a376888c3f63b9c8e45d4cee02117;p=linux-2.6 apm-emulation: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index cdd876dbb2..da8a1658a2 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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; }