• Hannes Reinecke's avatar
    [SCSI] sd: avoid deadlocks when running under multipath · 0761df9c
    Hannes Reinecke authored
    When multipathed systems run into an all-paths-down scenario
    all devices might be dropped, too. This causes 'del_gendisk'
    to be called, which will unregister the kobj_map->probe()
    function for all disk device numbers.
    When the device comes back the default ->probe() function
    is run which will call __request_module(), which will
    deadlock.
    As 'del_gendisk' typically does _not_ trigger a module unload
    the default ->probe() function is pointless anyway.
    This patch implements a dummy ->probe() function, which will
    just return NULL if the disk is not registered.
    This will avoid the deadlock. Plus it'll speed up device
    scanning.
    Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    0761df9c
sd.c 84.3 KB