• Tejun Heo's avatar
    [SCSI] sd: revive sd_index_lock · 4034cc68
    Tejun Heo authored
    Commit f27bac27 which converted sd to
    use ida instead of idr incorrectly removed sd_index_lock around id
    allocation and free.  idr/ida do have internal locks but they protect
    their free object lists not the allocation itself.  The caller is
    responsible for that.  This missing synchronization led to the same id
    being assigned to multiple devices leading to oops.
    
    Reported and tracked down by Stuart Hayes of Dell.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Stable Tree <stable@kernel.org>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
    4034cc68
sd.c 56.7 KB