From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Richter Subject: [PATCH] firewire: fw-sbp2: fix NULL pointer deref in slave_alloc Date: Sun, 17 Feb 2008 14:56:19 +0100 (CET) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: INLINE List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux1394-devel-bounces@lists.sourceforge.net Errors-To: linux1394-devel-bounces@lists.sourceforge.net To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org List-Id: linux-scsi@vger.kernel.org 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 --- drivers/firewire/fw-sbp2.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux/drivers/firewire/fw-sbp2.c =================================================================== --- linux.orig/drivers/firewire/fw-sbp2.c +++ linux/drivers/firewire/fw-sbp2.c @@ -1473,6 +1473,10 @@ static int sbp2_scsi_slave_alloc(struct { 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; /* -- Stefan Richter -=====-==--- --=- =---= http://arcgraph.de/sr/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/