mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
scsi: aacraid: Fix ioctl reset hang
Driver would hang when attempting to send reset from the ioctl interface, since it would wait to retrieve the ioctl mutex at send shutdown. Set adapter shutdown and unlock mutex before sending down reset request. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
95900629fa
commit
f3a2327725
@ -1052,9 +1052,13 @@ static int aac_send_reset_adapter(struct aac_dev *dev, void __user *arg)
|
||||
if (copy_from_user((void *)&reset, arg, sizeof(struct aac_reset_iop)))
|
||||
return -EFAULT;
|
||||
|
||||
retval = aac_reset_adapter(dev, 0, reset.reset_type);
|
||||
return retval;
|
||||
dev->adapter_shutdown = 1;
|
||||
|
||||
mutex_unlock(&dev->ioctl_mutex);
|
||||
retval = aac_reset_adapter(dev, 0, reset.reset_type);
|
||||
mutex_lock(&dev->ioctl_mutex);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user