Lines Matching refs:sub_info
199 static void umh_complete(struct subprocess_info *sub_info) in umh_complete() argument
201 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
210 call_usermodehelper_freeinfo(sub_info); in umh_complete()
218 struct subprocess_info *sub_info = data; in ____call_usermodehelper() local
246 if (sub_info->init) { in ____call_usermodehelper()
247 retval = sub_info->init(sub_info, new); in ____call_usermodehelper()
256 retval = do_execve(getname_kernel(sub_info->path), in ____call_usermodehelper()
257 (const char __user *const __user *)sub_info->argv, in ____call_usermodehelper()
258 (const char __user *const __user *)sub_info->envp); in ____call_usermodehelper()
260 sub_info->retval = retval; in ____call_usermodehelper()
262 if (!(sub_info->wait & UMH_WAIT_PROC)) in ____call_usermodehelper()
263 umh_complete(sub_info); in ____call_usermodehelper()
272 struct subprocess_info *sub_info = data; in wait_for_helper() local
277 pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD); in wait_for_helper()
279 sub_info->retval = pid; in wait_for_helper()
299 sub_info->retval = ret; in wait_for_helper()
302 umh_complete(sub_info); in wait_for_helper()
309 struct subprocess_info *sub_info = in __call_usermodehelper() local
313 if (sub_info->wait & UMH_WAIT_PROC) in __call_usermodehelper()
314 pid = kernel_thread(wait_for_helper, sub_info, in __call_usermodehelper()
317 pid = kernel_thread(____call_usermodehelper, sub_info, in __call_usermodehelper()
321 sub_info->retval = pid; in __call_usermodehelper()
322 umh_complete(sub_info); in __call_usermodehelper()
507 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
508 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
509 if (!sub_info) in call_usermodehelper_setup()
512 INIT_WORK(&sub_info->work, __call_usermodehelper); in call_usermodehelper_setup()
513 sub_info->path = path; in call_usermodehelper_setup()
514 sub_info->argv = argv; in call_usermodehelper_setup()
515 sub_info->envp = envp; in call_usermodehelper_setup()
517 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
518 sub_info->init = init; in call_usermodehelper_setup()
519 sub_info->data = data; in call_usermodehelper_setup()
521 return sub_info; in call_usermodehelper_setup()
537 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
542 if (!sub_info->path) { in call_usermodehelper_exec()
543 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
556 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
557 sub_info->wait = wait; in call_usermodehelper_exec()
559 queue_work(khelper_wq, &sub_info->work); in call_usermodehelper_exec()
569 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
576 retval = sub_info->retval; in call_usermodehelper_exec()
578 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()