lkml.org 
[lkml]   [2008]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] 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>
    ---
    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/


    \
     
     \ /
      Last update: 2008-02-17 14:59    [W:0.032 / U:30.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site