Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164671
b: refs/heads/master
c: c02e3f3
h: refs/heads/master
i:
  164669: ce8fc32
  164667: a20d4bc
  164663: d937066
  164655: 4c83c3d
  164639: 0511a0c
  164607: 3b7227b
v: v3
  • Loading branch information
Neil Horman authored and Linus Torvalds committed Sep 23, 2009
1 parent e54ce24 commit d91c365
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fd7317d02ec03c6fdf072317841287933d06d24
refs/heads/master: c02e3f361c75da04ca3025b4d19e947e9cc62ed3
13 changes: 8 additions & 5 deletions trunk/kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ struct subprocess_info {
static int ____call_usermodehelper(void *data)
{
struct subprocess_info *sub_info = data;
enum umh_wait wait = sub_info->wait;
int retval;

BUG_ON(atomic_read(&sub_info->cred->usage) != 1);
Expand Down Expand Up @@ -184,10 +185,14 @@ static int ____call_usermodehelper(void *data)
*/
set_user_nice(current, 0);

if (wait == UMH_WAIT_EXEC)
complete(sub_info->complete);

retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp);

/* Exec failed? */
sub_info->retval = retval;
if (wait != UMH_WAIT_EXEC)
sub_info->retval = retval;
do_exit(0);
}

Expand Down Expand Up @@ -266,16 +271,14 @@ static void __call_usermodehelper(struct work_struct *work)

switch (wait) {
case UMH_NO_WAIT:
case UMH_WAIT_EXEC:
break;

case UMH_WAIT_PROC:
if (pid > 0)
break;
sub_info->retval = pid;
/* FALLTHROUGH */

case UMH_WAIT_EXEC:
complete(sub_info->complete);
break;
}
}

Expand Down

0 comments on commit d91c365

Please sign in to comment.