From: Jonathan Corbet Date: Fri, 16 May 2008 20:08:58 +0000 (-0600) Subject: videopix: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~98 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9aaf20cbf5b7cccd45495326cba0b35b2884e6b3;p=linux-2.6 videopix: BKL pushdown Add explicit lock_kernel() calls to vfc_open(). Signed-off-by: Jonathan Corbet --- diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index d4f8fcded5..1f6cb8ae27 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -178,14 +179,17 @@ static int vfc_open(struct inode *inode, struct file *file) { struct vfc_dev *dev; + lock_kernel(); spin_lock(&vfc_dev_lock); dev = vfc_get_dev_ptr(iminor(inode)); if (dev == NULL) { spin_unlock(&vfc_dev_lock); + unlock_kernel(); return -ENODEV; } if (dev->busy) { spin_unlock(&vfc_dev_lock); + unlock_kernel(); return -EBUSY; } @@ -202,6 +206,7 @@ static int vfc_open(struct inode *inode, struct file *file) vfc_captstat_reset(dev); vfc_unlock_device(dev); + unlock_kernel(); return 0; }