Lines Matching refs:sub_info

49 static void umh_complete(struct subprocess_info *sub_info)  in umh_complete()  argument
51 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
60 call_usermodehelper_freeinfo(sub_info); in umh_complete()
68 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
101 if (sub_info->init) { in call_usermodehelper_exec_async()
102 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
112 retval = kernel_execve(sub_info->path, in call_usermodehelper_exec_async()
113 (const char *const *)sub_info->argv, in call_usermodehelper_exec_async()
114 (const char *const *)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()
139 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync()
143 umh_complete(sub_info); in call_usermodehelper_exec_sync()
162 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
165 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
166 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
174 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
177 sub_info->retval = pid; in call_usermodehelper_exec_work()
178 umh_complete(sub_info); in call_usermodehelper_exec_work()
364 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
365 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
366 if (!sub_info) in call_usermodehelper_setup()
369 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
372 sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; in call_usermodehelper_setup()
374 sub_info->path = path; in call_usermodehelper_setup()
376 sub_info->argv = argv; in call_usermodehelper_setup()
377 sub_info->envp = envp; in call_usermodehelper_setup()
379 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
380 sub_info->init = init; in call_usermodehelper_setup()
381 sub_info->data = data; in call_usermodehelper_setup()
383 return sub_info; in call_usermodehelper_setup()
404 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
409 if (!sub_info->path) { in call_usermodehelper_exec()
410 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
424 if (strlen(sub_info->path) == 0) in call_usermodehelper_exec()
432 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
433 sub_info->wait = wait; in call_usermodehelper_exec()
435 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
445 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
452 retval = sub_info->retval; in call_usermodehelper_exec()
454 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()