mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
usermodehelper: split remaining calls to call_usermodehelper_fns()
These are the only users of call_usermodehelper_fns(). This function suffers from not being able to determine if the cleanup is called. Even if in this places the cleanup pointer is NULL, convert them to use the separate call_usermodehelper_setup() + call_usermodehelper_exec() functions so we can remove the _fns variant. Signed-off-by: Lucas De Marchi <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: David Howells <[email protected]> Cc: James Morris <[email protected]> Cc: Al Viro <[email protected]> Cc: Tejun Heo <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fb96c475f6
commit
907ed1328d
2 changed files with 15 additions and 5 deletions
|
|
@ -525,6 +525,7 @@ void do_coredump(siginfo_t *siginfo)
|
|||
if (ispipe) {
|
||||
int dump_count;
|
||||
char **helper_argv;
|
||||
struct subprocess_info *sub_info;
|
||||
|
||||
if (ispipe < 0) {
|
||||
printk(KERN_WARNING "format_corename failed\n");
|
||||
|
|
@ -571,9 +572,14 @@ void do_coredump(siginfo_t *siginfo)
|
|||
goto fail_dropcount;
|
||||
}
|
||||
|
||||
retval = call_usermodehelper_fns(helper_argv[0], helper_argv,
|
||||
NULL, UMH_WAIT_EXEC, umh_pipe_setup,
|
||||
NULL, &cprm);
|
||||
retval = -ENOMEM;
|
||||
sub_info = call_usermodehelper_setup(helper_argv[0],
|
||||
helper_argv, NULL, GFP_KERNEL,
|
||||
umh_pipe_setup, NULL, &cprm);
|
||||
if (sub_info)
|
||||
retval = call_usermodehelper_exec(sub_info,
|
||||
UMH_WAIT_EXEC);
|
||||
|
||||
argv_free(helper_argv);
|
||||
if (retval) {
|
||||
printk(KERN_INFO "Core dump to %s pipe failed\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue