Re: [PATCH 2/6] sd: improve TUR handling in sd_check_events

2017-02-15 Thread Hannes Reinecke
On 02/14/2017 08:15 PM, Christoph Hellwig wrote: > Remove bogus evaluations of retval and sshdr when the device is offline, > and fix a possible NULL pointer dereference by allocating the 8 byte > sized sense header on stack. > > Signed-off-by: Christoph Hellwig > --- >

[PATCH 2/6] sd: improve TUR handling in sd_check_events

2017-02-14 Thread Christoph Hellwig
Remove bogus evaluations of retval and sshdr when the device is offline, and fix a possible NULL pointer dereference by allocating the 8 byte sized sense header on stack. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 25 +++-- 1 file changed, 11