]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Enable signals for usermode helpers
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 23 Feb 2003 11:18:14 +0000 (03:18 -0800)
committerDavid S. Miller <davem@kernel.bkbits.net>
Sun, 23 Feb 2003 11:18:14 +0000 (03:18 -0800)
Stelian Pop reported that all signals are blocked in processes
execed from the kernel as usermode helpers.

kernel/kmod.c

index a715e06ab4a768dd2982e99fbe73c9645647fca4..01c18cacc58b405a6afc6282ada863c14bc3c44c 100644 (file)
@@ -152,6 +152,14 @@ static int ____call_usermodehelper(void *data)
        struct subprocess_info *sub_info = data;
        int retval;
 
+       /* Unblock all signals. */
+       flush_signals(current);
+       spin_lock_irq(&current->sighand->siglock);
+       flush_signal_handlers(current);
+       sigemptyset(&current->blocked);
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
        retval = -EPERM;
        if (current->fs->root)
                retval = execve(sub_info->path, sub_info->argv,sub_info->envp);