Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165599
b: refs/heads/master
c: 95e0d86
h: refs/heads/master
i:
  165597: 8c9ff63
  165595: 4a5e44a
  165591: 06b3ea9
  165583: 317f36d
  165567: 872d2eb
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and Linus Torvalds committed Sep 24, 2009
1 parent be7f0ce commit 9a965b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 0dd52d0df02733dfc2d5f3824e41b96492305384
refs/heads/master: 95e0d86badc410d525ea7218fd32df7bfbf9c837
13 changes: 5 additions & 8 deletions trunk/kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ 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 @@ -185,14 +184,10 @@ 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? */
if (wait != UMH_WAIT_EXEC)
sub_info->retval = retval;
sub_info->retval = retval;
do_exit(0);
}

Expand Down Expand Up @@ -271,14 +266,16 @@ 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;
break;
/* FALLTHROUGH */

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

Expand Down

0 comments on commit 9a965b1

Please sign in to comment.