Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm mpath: check if scsi_dh module already loaded before trying to load

If the requested scsi_dh module is already loaded then skip
request_module().

Multipath table loads can hang in an unnecessary __request_module.

Reported-by: Ben Marzinski <bmarzins@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Mike Snitzer and committed by
Alasdair G Kergon
510193a2 7cab8bf1

+2 -2
+2 -2
drivers/md/dm-mpath.c
··· 718 718 return 0; 719 719 720 720 m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); 721 - request_module("scsi_dh_%s", m->hw_handler_name); 722 - if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { 721 + if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name), 722 + "scsi_dh_%s", m->hw_handler_name)) { 723 723 ti->error = "unknown hardware handler type"; 724 724 ret = -EINVAL; 725 725 goto fail;