• Home
  • Raw
  • Download

Lines Matching refs:sub_info

51 static void umh_complete(struct subprocess_info *sub_info)  in umh_complete()  argument
53 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
62 call_usermodehelper_freeinfo(sub_info); in umh_complete()
70 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
95 if (sub_info->init) { in call_usermodehelper_exec_async()
96 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
105 sub_info->pid = task_pid_nr(current); in call_usermodehelper_exec_async()
106 if (sub_info->file) { in call_usermodehelper_exec_async()
107 retval = do_execve_file(sub_info->file, in call_usermodehelper_exec_async()
108 sub_info->argv, sub_info->envp); in call_usermodehelper_exec_async()
112 retval = do_execve(getname_kernel(sub_info->path), in call_usermodehelper_exec_async()
113 (const char __user *const __user *)sub_info->argv, in call_usermodehelper_exec_async()
114 (const char __user *const __user *)sub_info->envp); in call_usermodehelper_exec_async()
116 sub_info->retval = retval; in call_usermodehelper_exec_async()
121 if (!(sub_info->wait & UMH_WAIT_PROC)) in call_usermodehelper_exec_async()
122 umh_complete(sub_info); in call_usermodehelper_exec_async()
129 static void call_usermodehelper_exec_sync(struct subprocess_info *sub_info) in call_usermodehelper_exec_sync() argument
135 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
137 sub_info->retval = pid; in call_usermodehelper_exec_sync()
158 sub_info->retval = ret; in call_usermodehelper_exec_sync()
164 umh_complete(sub_info); in call_usermodehelper_exec_sync()
183 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
186 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
187 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
195 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
198 sub_info->retval = pid; in call_usermodehelper_exec_work()
199 umh_complete(sub_info); in call_usermodehelper_exec_work()
385 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
386 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
387 if (!sub_info) in call_usermodehelper_setup()
390 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
393 sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; in call_usermodehelper_setup()
395 sub_info->path = path; in call_usermodehelper_setup()
397 sub_info->argv = argv; in call_usermodehelper_setup()
398 sub_info->envp = envp; in call_usermodehelper_setup()
400 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
401 sub_info->init = init; in call_usermodehelper_setup()
402 sub_info->data = data; in call_usermodehelper_setup()
404 return sub_info; in call_usermodehelper_setup()
412 struct subprocess_info *sub_info; in call_usermodehelper_setup_file() local
416 sub_info = kzalloc(sizeof(struct subprocess_info), GFP_KERNEL); in call_usermodehelper_setup_file()
417 if (!sub_info) in call_usermodehelper_setup_file()
420 sub_info->argv = argv_split(GFP_KERNEL, cmdline, NULL); in call_usermodehelper_setup_file()
421 if (!sub_info->argv) { in call_usermodehelper_setup_file()
422 kfree(sub_info); in call_usermodehelper_setup_file()
426 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup_file()
427 sub_info->path = "none"; in call_usermodehelper_setup_file()
428 sub_info->file = file; in call_usermodehelper_setup_file()
429 sub_info->init = init; in call_usermodehelper_setup_file()
430 sub_info->cleanup = cleanup; in call_usermodehelper_setup_file()
431 sub_info->data = data; in call_usermodehelper_setup_file()
432 return sub_info; in call_usermodehelper_setup_file()
500 struct subprocess_info *sub_info; in fork_usermode_blob() local
519 sub_info = call_usermodehelper_setup_file(file, umh_pipe_setup, in fork_usermode_blob()
521 if (!sub_info) in fork_usermode_blob()
524 err = call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC); in fork_usermode_blob()
548 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
553 if (!sub_info->path) { in call_usermodehelper_exec()
554 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
568 if (strlen(sub_info->path) == 0) in call_usermodehelper_exec()
576 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
577 sub_info->wait = wait; in call_usermodehelper_exec()
579 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
589 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
596 retval = sub_info->retval; in call_usermodehelper_exec()
598 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()