]> git.baikalelectronics.ru Git - kernel.git/commit
SCSI: Fix error handling when no ULD is attached
authorMartin K. Petersen <martin.petersen@oracle.com>
Sun, 15 Apr 2012 03:01:28 +0000 (23:01 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 15 Apr 2012 18:08:53 +0000 (11:08 -0700)
commit916af5df9e3fa44437be8b85d50a865789796219
tree6f2183e84c2bcfdc6eebed82319a4a21b871bdea
parentacb1d3ee69a2ed8c361c266adf71550c5936c1ea
SCSI: Fix error handling when no ULD is attached

Commit 0ab702cd3c49 ("[SCSI] Handle disk devices which can not process
medium access commands") introduced a bug in which we would attempt to
dereference the scsi driver even when the device had no ULD attached.

Ensure that a driver is registered and make the driver accessor function
more resilient to errors during device discovery.

Reported-by: Elric Fu <elricfu1@gmail.com>
Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/scsi_error.c
include/scsi/scsi_cmnd.h