summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-02-23 03:18:14 -0800
committerDavid S. Miller <davem@kernel.bkbits.net>2003-02-23 03:18:14 -0800
commitd691958b0b3d0fa53a9231ee81efb53073b7119c (patch)
treec201dc8bcdaa663c45a1e84c3dd996151bfc22d5 /kernel
parentfd0dacffdd8b2d84af68aef59fd2fff662323928 (diff)
[PATCH] Enable signals for usermode helpers
Stelian Pop reported that all signals are blocked in processes execed from the kernel as usermode helpers.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kmod.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index a715e06ab4a7..01c18cacc58b 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -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);