]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[SCSI] sd: avoid deadlocks when running under multipath
authorHannes Reinecke <hare@suse.de>
Fri, 10 May 2013 09:06:16 +0000 (11:06 +0200)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 4 Jun 2013 18:16:23 +0000 (11:16 -0700)
commit0761df9c4b2d966da3af2ac4ee7372afa681ce63
tree270b55e300537889e9eb2254f04f824abb964cbd
parent70288b4c8fd35340b79b25b2ac9c86a79d105e60
[SCSI] sd: avoid deadlocks when running under multipath

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: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sd.c