diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /drivers/scsi/aacraid | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 9c0c9117853..1a5bf572475 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -655,9 +655,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
655 | /* Does this really need to be GFP_DMA? */ | 655 | /* Does this really need to be GFP_DMA? */ |
656 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); | 656 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); |
657 | if(!p) { | 657 | if(!p) { |
658 | kfree (usg); | 658 | dprintk((KERN_DEBUG "aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n", |
659 | dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n", | ||
660 | usg->sg[i].count,i,usg->count)); | 659 | usg->sg[i].count,i,usg->count)); |
660 | kfree(usg); | ||
661 | rcode = -ENOMEM; | 661 | rcode = -ENOMEM; |
662 | goto cleanup; | 662 | goto cleanup; |
663 | } | 663 | } |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index e9373a2d14f..33898b61fdb 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 | ||
708 | static int aac_cfg_ioctl(struct inode *inode, struct file *file, | 708 | static 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 | ||
1030 | static const struct file_operations aac_cfg_fops = { | 1035 | static 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 |