]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/3w-9xxx.c
Add a bunch of cycle_kernel_lock() calls
[linux-2.6-omap-h63xx.git] / drivers / scsi / 3w-9xxx.c
index 2239d16fb9b568225df0fa5e0e26eaec4a2be5f7..eaa805df5b003ccb3b6b019763291179398e184e 100644 (file)
@@ -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;