aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index e9373a2d14fa..33898b61fdb5 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -705,12 +705,17 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
705 * Bugs: Needs to handle hot plugging 705 * Bugs: Needs to handle hot plugging
706 */ 706 */
707 707
708static int aac_cfg_ioctl(struct inode *inode, struct file *file, 708static long aac_cfg_ioctl(struct file *file,
709 unsigned int cmd, unsigned long arg) 709 unsigned int cmd, unsigned long arg)
710{ 710{
711 int ret;
711 if (!capable(CAP_SYS_RAWIO)) 712 if (!capable(CAP_SYS_RAWIO))
712 return -EPERM; 713 return -EPERM;
713 return aac_do_ioctl(file->private_data, cmd, (void __user *)arg); 714 lock_kernel();
715 ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
716 unlock_kernel();
717
718 return ret;
714} 719}
715 720
716#ifdef CONFIG_COMPAT 721#ifdef CONFIG_COMPAT
@@ -1029,7 +1034,7 @@ ssize_t aac_get_serial_number(struct device *device, char *buf)
1029 1034
1030static const struct file_operations aac_cfg_fops = { 1035static const struct file_operations aac_cfg_fops = {
1031 .owner = THIS_MODULE, 1036 .owner = THIS_MODULE,
1032 .ioctl = aac_cfg_ioctl, 1037 .unlocked_ioctl = aac_cfg_ioctl,
1033#ifdef CONFIG_COMPAT 1038#ifdef CONFIG_COMPAT
1034 .compat_ioctl = aac_compat_cfg_ioctl, 1039 .compat_ioctl = aac_compat_cfg_ioctl,
1035#endif 1040#endif