Lines Matching refs:sub_info

46 static void umh_complete(struct subprocess_info *sub_info)  in umh_complete()  argument
48 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
57 call_usermodehelper_freeinfo(sub_info); in umh_complete()
65 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
98 if (sub_info->init) { in call_usermodehelper_exec_async()
99 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
109 retval = kernel_execve(sub_info->path, in call_usermodehelper_exec_async()
110 (const char *const *)sub_info->argv, in call_usermodehelper_exec_async()
111 (const char *const *)sub_info->envp); in call_usermodehelper_exec_async()
113 sub_info->retval = retval; in call_usermodehelper_exec_async()
118 if (!(sub_info->wait & UMH_WAIT_PROC)) in call_usermodehelper_exec_async()
119 umh_complete(sub_info); in call_usermodehelper_exec_async()
126 static void call_usermodehelper_exec_sync(struct subprocess_info *sub_info) in call_usermodehelper_exec_sync() argument
132 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
134 sub_info->retval = pid; in call_usermodehelper_exec_sync()
136 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync()
140 umh_complete(sub_info); in call_usermodehelper_exec_sync()
159 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
162 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
163 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
171 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
174 sub_info->retval = pid; in call_usermodehelper_exec_work()
175 umh_complete(sub_info); in call_usermodehelper_exec_work()
361 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
362 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
363 if (!sub_info) in call_usermodehelper_setup()
366 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
369 sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; in call_usermodehelper_setup()
371 sub_info->path = path; in call_usermodehelper_setup()
373 sub_info->argv = argv; in call_usermodehelper_setup()
374 sub_info->envp = envp; in call_usermodehelper_setup()
376 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
377 sub_info->init = init; in call_usermodehelper_setup()
378 sub_info->data = data; in call_usermodehelper_setup()
380 return sub_info; in call_usermodehelper_setup()
401 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
407 if (!sub_info->path) { in call_usermodehelper_exec()
408 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
422 if (strlen(sub_info->path) == 0) in call_usermodehelper_exec()
430 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
431 sub_info->wait = wait; in call_usermodehelper_exec()
433 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
446 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
460 retval = sub_info->retval; in call_usermodehelper_exec()
462 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()