Lines Matching refs:sub_info
50 static void umh_complete(struct subprocess_info *sub_info) in umh_complete() argument
52 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete()
61 call_usermodehelper_freeinfo(sub_info); in umh_complete()
69 struct subprocess_info *sub_info = data; in call_usermodehelper_exec_async() local
102 if (sub_info->init) { in call_usermodehelper_exec_async()
103 retval = sub_info->init(sub_info, new); in call_usermodehelper_exec_async()
113 retval = kernel_execve(sub_info->path, in call_usermodehelper_exec_async()
114 (const char *const *)sub_info->argv, in call_usermodehelper_exec_async()
115 (const char *const *)sub_info->envp); in call_usermodehelper_exec_async()
117 sub_info->retval = retval; in call_usermodehelper_exec_async()
122 if (!(sub_info->wait & UMH_WAIT_PROC)) in call_usermodehelper_exec_async()
123 umh_complete(sub_info); in call_usermodehelper_exec_async()
130 static void call_usermodehelper_exec_sync(struct subprocess_info *sub_info) in call_usermodehelper_exec_sync() argument
136 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
138 sub_info->retval = pid; in call_usermodehelper_exec_sync()
140 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync()
144 umh_complete(sub_info); in call_usermodehelper_exec_sync()
163 struct subprocess_info *sub_info = in call_usermodehelper_exec_work() local
166 if (sub_info->wait & UMH_WAIT_PROC) { in call_usermodehelper_exec_work()
167 call_usermodehelper_exec_sync(sub_info); in call_usermodehelper_exec_work()
175 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
178 sub_info->retval = pid; in call_usermodehelper_exec_work()
179 umh_complete(sub_info); in call_usermodehelper_exec_work()
365 struct subprocess_info *sub_info; in call_usermodehelper_setup() local
366 sub_info = kzalloc(sizeof(struct subprocess_info), gfp_mask); in call_usermodehelper_setup()
367 if (!sub_info) in call_usermodehelper_setup()
370 INIT_WORK(&sub_info->work, call_usermodehelper_exec_work); in call_usermodehelper_setup()
373 sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH; in call_usermodehelper_setup()
375 sub_info->path = path; in call_usermodehelper_setup()
377 sub_info->argv = argv; in call_usermodehelper_setup()
378 sub_info->envp = envp; in call_usermodehelper_setup()
380 sub_info->cleanup = cleanup; in call_usermodehelper_setup()
381 sub_info->init = init; in call_usermodehelper_setup()
382 sub_info->data = data; in call_usermodehelper_setup()
384 return sub_info; in call_usermodehelper_setup()
405 int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) in call_usermodehelper_exec() argument
411 if (!sub_info->path) { in call_usermodehelper_exec()
412 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()
426 if (strlen(sub_info->path) == 0) in call_usermodehelper_exec()
434 sub_info->complete = (wait == UMH_NO_WAIT) ? NULL : &done; in call_usermodehelper_exec()
435 sub_info->wait = wait; in call_usermodehelper_exec()
437 queue_work(system_unbound_wq, &sub_info->work); in call_usermodehelper_exec()
453 if (xchg(&sub_info->complete, NULL)) in call_usermodehelper_exec()
458 retval = sub_info->retval; in call_usermodehelper_exec()
460 call_usermodehelper_freeinfo(sub_info); in call_usermodehelper_exec()