lkml.org 
[lkml]   [2013]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 013/100] SCSI: dc395x: uninitialized variable in device_alloc()
    Date
    3.8-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit 208afec4f3be8c51ad6eebe6611dd6d2ad2fa298 upstream.

    This bug was introduced back in bitkeeper days in 2003. We use
    "dcb->dev_mode" before it has been initialized.

    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Oliver Neukum <oliver@neukum.org>
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/scsi/dc395x.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/scsi/dc395x.c
    +++ b/drivers/scsi/dc395x.c
    @@ -3747,13 +3747,13 @@ static struct DeviceCtlBlk *device_alloc
    dcb->max_command = 1;
    dcb->target_id = target;
    dcb->target_lun = lun;
    + dcb->dev_mode = eeprom->target[target].cfg0;
    #ifndef DC395x_NO_DISCONNECT
    dcb->identify_msg =
    IDENTIFY(dcb->dev_mode & NTC_DO_DISCONNECT, lun);
    #else
    dcb->identify_msg = IDENTIFY(0, lun);
    #endif
    - dcb->dev_mode = eeprom->target[target].cfg0;
    dcb->inquiry7 = 0;
    dcb->sync_mode = 0;
    dcb->min_nego_period = clock_period[period_index];



    \
     
     \ /
      Last update: 2013-03-13 15:02    [W:7.318 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site