diff options
author | Ned Bass <[email protected]> | 2013-01-09 16:09:47 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-01-09 16:54:19 -0800 |
commit | 8842263bd0f3c2f78c9cd52be8a74d4376396501 (patch) | |
tree | 762b16c6b7148db9f6c98d5da934d2a118d539e6 | |
parent | 42b3ce622f53001d819e6c8eabe4576e6dd38913 (diff) |
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 <[email protected]>
-rw-r--r-- | module/spl/spl-generic.c | 4 | ||||
-rw-r--r-- | module/splat/splat-linux.c | 2 | ||||
-rw-r--r-- | module/splat/splat-vnode.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 22ea50781..39357617c 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -536,7 +536,7 @@ hostid_exec(void) * '/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. */ - rc = call_usermodehelper(argv[0], argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); if (rc) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); @@ -607,7 +607,7 @@ set_kallsyms_lookup_name(void) NULL }; 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 diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 76e2398da..0a1808f61 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -166,7 +166,7 @@ splat_linux_drop_slab(struct file *file) NULL }; int rc; - rc = call_usermodehelper(argv[0], argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); if (rc) splat_vprint(file, SPLAT_LINUX_TEST3_NAME, "Failed user helper '%s %s %s', rc = %d\n", diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 7d1c75f17..a7034c115 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -75,7 +75,7 @@ splat_vnode_user_cmd(struct file *file, void *arg, NULL }; int rc; - rc = call_usermodehelper(sh_path, argv, envp, 1); + rc = call_usermodehelper(sh_path, argv, envp, UMH_WAIT_PROC); if (rc) { splat_vprint(file, name, "Failed command: %s %s %s (%d)\n", |