diff options
author | Coly Li <colyli@suse.de> | 2025-01-22 16:18:59 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mtkaczyk@kernel.org> | 2025-01-27 10:11:40 +0100 |
commit | b1ee932b89a16c881a3336f9fd728d46c1f8c65d (patch) | |
tree | b0a58980164c4246311e13e5f9f8bfed15eab13a /tests/24raid10deadlock | |
parent | mdadm/raid6check: add xmalloc.h to raid6check.c (diff) | |
download | mdadm-b1ee932b89a16c881a3336f9fd728d46c1f8c65d.tar.xz mdadm-b1ee932b89a16c881a3336f9fd728d46c1f8c65d.zip |
mdopen: add sbin path to env PATH when call system("modprobe md_mod")
During the boot process if mdadm is called in udev context, sbin paths
like /sbin, /usr/sbin, /usr/local/sbin normally not defined in PATH env
variable, calling system("modprobe md_mod") in create_named_array() may
fail with 'sh: modprobe: command not found' error message.
We don't want to move modprobe binary into udev private directory, so
setting the PATH env is a more proper method to avoid the above issue.
This patch sets PATH env variable with "/sbin:/usr/sbin:/usr/local/sbin"
before calling system("modprobe md_mod"). The change only takes effect
within the udev worker context, not seen by global udev environment.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Mariusz Tkaczyk <mtkaczyk@kernel.org>
Diffstat (limited to 'tests/24raid10deadlock')
0 files changed, 0 insertions, 0 deletions