diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-18 23:32:43 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 22:05:53 +0200 |
commit | f2b9857eee17797541b845782ade4d7a9d50f843 (patch) | |
tree | 914a00afee2ff953199f99f7cf869e3fd83b36bd /drivers/scsi/3w-9xxx.c | |
parent | Add cycle_kernel_lock() (diff) | |
download | linux-f2b9857eee17797541b845782ade4d7a9d50f843.tar.xz linux-f2b9857eee17797541b845782ade4d7a9d50f843.zip |
Add a bunch of cycle_kernel_lock() calls
All of the open() functions which don't need the BKL on their face may
still depend on its acquisition to serialize opens against driver
initialization. So make those functions acquire then release the BKL to be
on the safe side.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/scsi/3w-9xxx.c')
-rw-r--r-- | drivers/scsi/3w-9xxx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 2239d16fb9b5..eaa805df5b00 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -84,6 +84,7 @@ #include <linux/pci.h> #include <linux/time.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/uaccess.h> @@ -862,13 +863,13 @@ out: } /* End twa_chrdev_ioctl() */ /* This function handles open for the character device */ -/* NOTE that this function will race with remove; adding BKL - will not help. */ +/* NOTE that this function will race with remove. */ static int twa_chrdev_open(struct inode *inode, struct file *file) { unsigned int minor_number; int retval = TW_IOCTL_ERROR_OS_ENODEV; + cycle_kernel_lock(); minor_number = iminor(inode); if (minor_number >= twa_device_extension_count) goto out; |