mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
firewire: fw-sbp2: fix NULL pointer deref. in slave_alloc
Fix a kernel bug when running rescan-scsi-bus while a FireWire disk is connected: http://bugzilla.kernel.org/show_bug.cgi?id=10008 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
2e2705bdcb
commit
5513c5f6f9
1 changed files with 4 additions and 0 deletions
|
@ -1473,6 +1473,10 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
|||
{
|
||||
struct sbp2_logical_unit *lu = sdev->hostdata;
|
||||
|
||||
/* (Re-)Adding logical units via the SCSI stack is not supported. */
|
||||
if (!lu)
|
||||
return -ENOSYS;
|
||||
|
||||
sdev->allow_restart = 1;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue