Skip to contentSkip to conversation

modutils: FATAL: Error running install...

DISCUSSION Stelian Pop 3 participants 4 messages Feb 24, 2003 – Feb 25, 2003

lore
Share & tools
lore
#0 lore raw

With the latest 2.5-bk (and module-init-tools), my logs are polluted with lines like:
FATAL: Error running install command for block_major_2
triggered with

	# cat /dev/fd0
where the corresponding line in modprobe.conf is:
	install block-major-2 /bin/true

The problem is reproductible with any 'install' command in modprobe.conf.

Looking at modprobe source, it fails on the system() call. The fork()/exec() part works corectly (/bin/true get executed), but wait4() fails with -ECHILD.

Running 'modprobe block-major-2' from the console works as expected.

I believe this is once again related to the exec_usermodehelper() routines...

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>
#1 lore raw
Quoted 3 lines · Stelian Pop

With the latest 2.5-bk (and module-init-tools), my logs are polluted with lines like:
FATAL: Error running install command for block_major_2

And replying to my own message after reading the latest posts on lkml, I confirm that Mikael Pettersson's patch works for me.

I rediffed it below against the latest bk.

Linus, please apply.

Stelian.

===== kernel/kmod.c 1.24 vs edited =====

kernel/kmod.c +1 -0
@@ -154,6 +154,7 @@
 
 	/* Unblock all signals. */
 	flush_signals(current);
+	current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL;
 	spin_lock_irq(&current->sighand->siglock);
 	flush_signal_handlers(current);
 	sigemptyset(&current->blocked);
Signature · 1 line
Stelian Pop <[email protected]>
#2 lore raw

In message <[email protected]> you write:

kernel/kmod.c line 160

Quoted 11 lines

===== kernel/kmod.c 1.24 vs edited =====

kernel/kmod.c +1 -0
@@ -154,6 +154,7 @@
 
 	/* Unblock all signals. */
 	flush_signals(current);
+	current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL;
 	spin_lock_irq(&current->sighand->siglock);
 	flush_signal_handlers(current);
 	sigemptyset(&current->blocked);

Is there really no cleaner way that this?

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#3 lore raw
Quoted 6 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 5 lines

===== kernel/kmod.c 1.24 vs edited =====

kernel/kmod.c +0 -0
@@ -154,6 +154,7 @@
 
Quoted 8 lines

kernel/kmod.c line 160

Quoted 6 lines
kernel/kmod.c +1 -0
 	/* Unblock all signals. */
 	flush_signals(current);
+	current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL;
 	spin_lock_irq(&current->sighand->siglock);
 	flush_signal_handlers(current);
 	sigemptyset(&current->blocked);

Is there really no cleaner way that this?

Linus cleaned it up in 2.5.63 -- he added a flag to flush_signal_handlers().