Lines Matching refs:sub_info
198 static void umh_complete(struct subprocess_info *sub_info) in umh_complete() argument
200 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
209 call_usermodehelper_freeinfo(sub_info); in umh_complete()
217 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
242 if (sub_info->init) { in call_usermodehelper_exec_async()
243 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
252 retval = do_execve(getname_kernel(sub_info->path), in call_usermodehelper_exec_async()
253 (const char __user *const __user *)sub_info->argv, in call_usermodehelper_exec_async()
254 (const char __user *const __user *)sub_info->envp); in call_usermodehelper_exec_async()
256 sub_info->retval = retval; in call_usermodehelper_exec_async()
261 if (!(sub_info->wait & UMH_WAIT_PROC)) in call_usermodehelper_exec_async()
262 umh_complete(sub_info); in call_usermodehelper_exec_async()
269 static void call_usermodehelper_exec_sync(struct subprocess_info *sub_info) in call_usermodehelper_exec_sync() argument
275 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
277 sub_info->retval = pid; in call_usermodehelper_exec_sync()
298 sub_info->retval = ret; in call_usermodehelper_exec_sync()
304 umh_complete(sub_info); in call_usermodehelper_exec_sync()
323 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
326 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
327 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
335 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
338 sub_info->retval = pid; in call_usermodehelper_exec_work()
339 umh_complete(sub_info); in call_usermodehelper_exec_work()
525 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
526 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
527 if (!sub_info) in call_usermodehelper_setup()
530 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
531 sub_info->path = path; in call_usermodehelper_setup()
532 sub_info->argv = argv; in call_usermodehelper_setup()
533 sub_info->envp = envp; in call_usermodehelper_setup()
535 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
536 sub_info->init = init; in call_usermodehelper_setup()
537 sub_info->data = data; in call_usermodehelper_setup()
539 return sub_info; in call_usermodehelper_setup()
555 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
560 if (!sub_info->path) { in call_usermodehelper_exec()
561 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
574 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
575 sub_info->wait = wait; in call_usermodehelper_exec()
577 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
587 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
594 retval = sub_info->retval; in call_usermodehelper_exec()
596 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()