From: Jonathan Corbet Date: Fri, 16 May 2008 20:06:45 +0000 (-0600) Subject: bpp: bkl pushdown X-Git-Tag: v2.6.27-rc1~1103^2~99 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5e9829ad38c24aa71252e643836e7cedcb1c83d7;p=linux-2.6-omap-h63xx.git 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 --- 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 #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; }