diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-16 14:06:45 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:05:51 -0600 |
commit | 5e9829ad38c24aa71252e643836e7cedcb1c83d7 (patch) | |
tree | 7eaa004d9e4b4f402e45354a37bc6d8d1a69beea /drivers/sbus/char | |
parent | 4541b5ec9f631a143cdea862d07ddfc3cdac36f2 (diff) |
bpp: bkl pushdown
Put explicit lock_kernel() calls into bpp_open(). It has locking, but I'm
not convinced it won't race with ioctl().
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/sbus/char')
-rw-r--r-- | drivers/sbus/char/bpp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index b87037ec980..c1c091a0057 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c @@ -19,6 +19,7 @@ #include <linux/timer.h> #include <linux/ioport.h> #include <linux/major.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -429,6 +430,7 @@ static int bpp_open(struct inode *inode, struct file *f) unsigned minor = iminor(inode); int ret; + lock_kernel(); spin_lock(&bpp_open_lock); ret = 0; if (minor >= BPP_NO) { @@ -444,6 +446,7 @@ static int bpp_open(struct inode *inode, struct file *f) } } spin_unlock(&bpp_open_lock); + unlock_kernel(); return ret; } |