• Alan Stern's avatar
    [PATCH] SCSI core: Fix refcounting error · dacfcf27
    Alan Stern authored
    This bug was present as of 2.6.9-bk7, apparently introduced along with the
    addition of SCSI targets into sysfs.  The code takes a reference to the
    host for each initialized sdev but only drops a reference when each
    target is released.  As you might expect, this causes a refcount leak
    whenever a target has more than 0 LUNs.
    
    The patch changes things so that the reference is acquired when the target
    is initialized, not when the sdev is initialized.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    dacfcf27
scsi_scan.c 37.3 KB