[lkml]   [2003]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [BUG] 2.5.62 kmod rewrite broke modprobe's install command
In message <> you write:
> The reason this happens is that in 2.5.62, modprobe is started
> with SIGCHLD set to SIG_IGN and not blocked. The "install"
> command is run by system(), but due to SIGCHLD being SIG_IGN,
> the child (which terminates quickly) is reaped automatically.
> The parent process (modprobe) does a wait or waitpid, which fails
> with ECHILD since the child is already gone. system() returns -1,
> and modprobe logs a fatal error.

Yes. Fixed below.

Thanks for the report!
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: Enable signals for usermode helpers
Author: Linus Torvalds
Status: Experimental

D: Stelian Pop reported that all signals are blocked in processes
D: execed from the kernel as usermode helpers.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.62-bk6/kernel/kmod.c working-2.5.62-bk6-usermode-sig/kernel/kmod.c
--- linux-2.5.62-bk6/kernel/kmod.c 2003-02-18 11:18:57.000000000 +1100
+++ working-2.5.62-bk6-usermode-sig/kernel/kmod.c 2003-02-24 12:18:55.000000000 +1100
@@ -152,6 +152,14 @@ static int ____call_usermodehelper(void
struct subprocess_info *sub_info = data;
int retval;

+ /* Unblock all signals. */
+ flush_signals(curtask);
+ flush_signal_handlers(curtask);
+ spin_lock_irq(&curtask->sighand->siglock);
+ sigemptyset(&curtask->blocked);
+ recalc_sigpending();
+ spin_unlock_irq(&curtask->sighand->siglock);
retval = -EPERM;
if (current->fs->root)
retval = execve(sub_info->path, sub_info->argv,sub_info->envp);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:33    [W:0.043 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site