Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5513c5f6f9bd8c8ad3727130910fa288c62526a7 Commit: 5513c5f6f9bd8c8ad3727130910fa288c62526a7 Parent: 2e2705bdcb959372d54bf7f79dd9a555ec2adfb4 Author: Stefan Richter <[EMAIL PROTECTED]> AuthorDate: Sun Feb 17 14:56:19 2008 +0100 Committer: Stefan Richter <[EMAIL PROTECTED]> CommitDate: Tue Feb 19 19:57:23 2008 +0100
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 <[EMAIL PROTECTED]> --- 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 ea4811c..60ebcb5 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; /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html