diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-02-17 16:56:19 +0300 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-02-19 21:57:23 +0300 |
commit | 5513c5f6f9bd8c8ad3727130910fa288c62526a7 (patch) | |
tree | 0212d6211a5d8e6429b340c19448c2654efc50f1 /drivers/firewire | |
parent | 2e2705bdcb959372d54bf7f79dd9a555ec2adfb4 (diff) | |
download | linux-5513c5f6f9bd8c8ad3727130910fa288c62526a7.tar.xz |
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>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index ea4811c45512..60ebcb5fe21a 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -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; /* |