aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-17 08:56:19 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-19 13:57:23 -0500
commit5513c5f6f9bd8c8ad3727130910fa288c62526a7 (patch)
tree0212d6211a5d8e6429b340c19448c2654efc50f1 /drivers/firewire/fw-sbp2.c
parent2e2705bdcb959372d54bf7f79dd9a555ec2adfb4 (diff)
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/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c4
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)
1473{ 1473{
1474 struct sbp2_logical_unit *lu = sdev->hostdata; 1474 struct sbp2_logical_unit *lu = sdev->hostdata;
1475 1475
1476 /* (Re-)Adding logical units via the SCSI stack is not supported. */
1477 if (!lu)
1478 return -ENOSYS;
1479
1476 sdev->allow_restart = 1; 1480 sdev->allow_restart = 1;
1477 1481
1478 /* 1482 /*