• James Bottomley's avatar
    SCSI: fix Stack overflow when lldd returns SCSI_MLQUEUE_DEVICE_BUSY · 7d2370c1
    James Bottomley authored
    From: 	Heiko Carstens <Heiko.Carstens@de.ibm.com>
    
    This happened when sending out the inquiry command and the LLDD was in
    recovery for the specific LUN and returned SCSI_MLQUEUE_DEVICE_BUSY.
    Problem is that max_device_blocked gets set _after_ the inquiry command
    finished. In this specific case max_device_blocked was 0 and thus the
    device was never blocked resulting in the observed stack overflow.
    I moved the initializazion of max_device_blocked from scsi_add_lun to
    sdev_alloc_sdev and the problem is gone.
    7d2370c1
scsi_scan.c 38.3 KB