mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
call_usermodehelper() should wait for process
As of Linux 3.4 the UMH_WAIT_* constants were renumbered. In particular, the meaning of "1" changed from UMH_WAIT_PROC (wait for process to complete), to UMH_WAIT_EXEC (wait for the exec, but not the process). A number of call sites used the number 1 instead of the constant name, so the behavior was not as expected on kernels with this change. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
42b3ce622f
commit
8842263bd0
@ -536,7 +536,7 @@ hostid_exec(void)
|
|||||||
* '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid
|
* '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid
|
||||||
* for us to use. It's a horrific solution but it will do for now.
|
* for us to use. It's a horrific solution but it will do for now.
|
||||||
*/
|
*/
|
||||||
rc = call_usermodehelper(argv[0], argv, envp, 1);
|
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||||
if (rc)
|
if (rc)
|
||||||
printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
|
printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
|
||||||
argv[0], argv[1], argv[2], rc);
|
argv[0], argv[1], argv[2], rc);
|
||||||
@ -607,7 +607,7 @@ set_kallsyms_lookup_name(void)
|
|||||||
NULL };
|
NULL };
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = call_usermodehelper(argv[0], argv, envp, 1);
|
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Due to I/O buffering the helper may return successfully before
|
* Due to I/O buffering the helper may return successfully before
|
||||||
|
@ -166,7 +166,7 @@ splat_linux_drop_slab(struct file *file)
|
|||||||
NULL };
|
NULL };
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = call_usermodehelper(argv[0], argv, envp, 1);
|
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||||
if (rc)
|
if (rc)
|
||||||
splat_vprint(file, SPLAT_LINUX_TEST3_NAME,
|
splat_vprint(file, SPLAT_LINUX_TEST3_NAME,
|
||||||
"Failed user helper '%s %s %s', rc = %d\n",
|
"Failed user helper '%s %s %s', rc = %d\n",
|
||||||
|
@ -75,7 +75,7 @@ splat_vnode_user_cmd(struct file *file, void *arg,
|
|||||||
NULL };
|
NULL };
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = call_usermodehelper(sh_path, argv, envp, 1);
|
rc = call_usermodehelper(sh_path, argv, envp, UMH_WAIT_PROC);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
splat_vprint(file, name,
|
splat_vprint(file, name,
|
||||||
"Failed command: %s %s %s (%d)\n",
|
"Failed command: %s %s %s (%d)\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user