Lines Matching refs:sub_info

47 static void umh_complete(struct subprocess_info *sub_info)  in umh_complete()  argument
49 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
58 call_usermodehelper_freeinfo(sub_info); in umh_complete()
66 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
99 if (sub_info->init) { in call_usermodehelper_exec_async()
100 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
110 retval = kernel_execve(sub_info->path, in call_usermodehelper_exec_async()
111 (const char *const *)sub_info->argv, in call_usermodehelper_exec_async()
112 (const char *const *)sub_info->envp); in call_usermodehelper_exec_async()
114 sub_info->retval = retval; in call_usermodehelper_exec_async()
119 if (!(sub_info->wait & UMH_WAIT_PROC)) in call_usermodehelper_exec_async()
120 umh_complete(sub_info); in call_usermodehelper_exec_async()
127 static void call_usermodehelper_exec_sync(struct subprocess_info *sub_info) in call_usermodehelper_exec_sync() argument
133 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
135 sub_info->retval = pid; in call_usermodehelper_exec_sync()
137 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync()
141 umh_complete(sub_info); in call_usermodehelper_exec_sync()
160 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
163 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
164 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
172 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
175 sub_info->retval = pid; in call_usermodehelper_exec_work()
176 umh_complete(sub_info); in call_usermodehelper_exec_work()
362 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
363 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
364 if (!sub_info) in call_usermodehelper_setup()
367 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
370 sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; in call_usermodehelper_setup()
372 sub_info->path = path; in call_usermodehelper_setup()
374 sub_info->argv = argv; in call_usermodehelper_setup()
375 sub_info->envp = envp; in call_usermodehelper_setup()
377 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
378 sub_info->init = init; in call_usermodehelper_setup()
379 sub_info->data = data; in call_usermodehelper_setup()
381 return sub_info; in call_usermodehelper_setup()
402 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
408 if (!sub_info->path) { in call_usermodehelper_exec()
409 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
423 if (strlen(sub_info->path) == 0) in call_usermodehelper_exec()
431 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
432 sub_info->wait = wait; in call_usermodehelper_exec()
434 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
447 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
461 retval = sub_info->retval; in call_usermodehelper_exec()
463 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()