Re: [PATCH v2 4/5] bnx2fc: Check sc_cmd device and host pointer before returning the command to the mid-layer.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Donnerstag, 7. April 2016 09:07:59 CEST Chad Dupuis wrote:
> When we are in connection recovery and the internal command timer on a
> request pops, either the scsi_cmnd->device or scsi_cmnd->device->host back
> pointers may be NULL as the device that the command that the request was
> submitted on may have been subsequently reaped due to the connection
> recovery. This can cause one or both of the pointers above to be NULL and
> cause a system crash if we try to return the command to the midlayer.
> 
> Instead, double check the pointers before the return to the midlayer so as
> to prevent the crash and let the upper layers finish the session recovery
> and rediscover the device.
> 
> Signed-off-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
> ---

Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux