Skip to content

Commit b344992

Browse files
oleg-nesterovtorvalds
authored andcommitted
usermodehelper: introduce umh_complete(sub_info)
Preparation. Add the new trivial helper, umh_complete(). Currently it simply does complete(sub_info->complete). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Tejun Heo <tj@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 70834d3 commit b344992

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎kernel/kmod.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info)
199199
}
200200
EXPORT_SYMBOL(call_usermodehelper_freeinfo);
201201

202+
static void umh_complete(struct subprocess_info *sub_info)
203+
{
204+
complete(sub_info->complete);
205+
}
206+
202207
/* Keventd can't block, but this (a child) can. */
203208
static int wait_for_helper(void *data)
204209
{
@@ -235,7 +240,7 @@ static int wait_for_helper(void *data)
235240
sub_info->retval = ret;
236241
}
237242

238-
complete(sub_info->complete);
243+
umh_complete(sub_info);
239244
return 0;
240245
}
241246

@@ -269,7 +274,7 @@ static void __call_usermodehelper(struct work_struct *work)
269274
case UMH_WAIT_EXEC:
270275
if (pid < 0)
271276
sub_info->retval = pid;
272-
complete(sub_info->complete);
277+
umh_complete(sub_info);
273278
}
274279
}
275280

0 commit comments

Comments
 (0)