From 5e9829ad38c24aa71252e643836e7cedcb1c83d7 Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Fri, 16 May 2008 14:06:45 -0600 Subject: 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 --- drivers/sbus/char/bpp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index b87037ec9805..c1c091a00575 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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; } -- cgit v1.2.3