projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b828299
)
apm-emulation: BKL pushdown
author
Arnd Bergmann
<arnd@arndb.de>
Tue, 20 May 2008 17:15:33 +0000
(19:15 +0200)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:54 +0000
(14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/char/apm-emulation.c
patch
|
blob
|
history
diff --git
a/drivers/char/apm-emulation.c
b/drivers/char/apm-emulation.c
index cdd876dbb2b0f77ab05e27c37f0671724743537c..da8a1658a273b6253172b0622631796c4af137f0 100644
(file)
--- 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;
}