[PATCH v4 32/32] cxlflash: Fix to avoid potential deadlock on EEH
Matthew R. Ochs
mrochs at linux.vnet.ibm.com
Wed Sep 30 05:40:09 AEST 2015
> On Sep 28, 2015, at 6:41 PM, Brian King <brking at linux.vnet.ibm.com> wrote:
> On 09/25/2015 06:19 PM, Matthew R. Ochs wrote:
>> static int write_same16(struct scsi_device *sdev,
>> @@ -433,9 +451,20 @@ static int write_same16(struct scsi_device *sdev,
>> put_unaligned_be32(ws_limit < left ? ws_limit : left,
>> &scsi_cmd[10]);
>>
>> + /* Drop the ioctl read semahpore across lengthy call */
>> + up_read(&cfg->ioctl_rwsem);
>> result = scsi_execute(sdev, scsi_cmd, DMA_TO_DEVICE, cmd_buf,
>> CMD_BUFSIZE, sense_buf, to, CMD_RETRIES,
>> 0, NULL);
>> + down_read(&cfg->ioctl_rwsem);
>> + rc = check_state(cfg);
>> + if (rc) {
>> + dev_err(dev, "%s: Failed state! result=0x08%X\n",
>> + __func__, result);
>> + rc = -ENODEV;
>
> Since check_state only returns 0 or -ENODEV, this is a bit redundant, but not worth redoing the
> patch in my mind.
Agreed. This occurred to me the other day after submitting this patch when I was
reviewing the state locking code. Will look at revising in a future patch.
Thanks again for reviewing.
More information about the Linuxppc-dev
mailing list