[BUG] 2.5.62 kmod rewrite broke modprobe's install command

From: Mikael Pettersson (mikpe@user.it.uu.se)
Date: Sun Feb 23 2003 - 08:00:04 EST


In kernel 2.5.62, modprobe logs "FATAL: Error -1" when invoked
via request_module() to run a trivial /bin/true "install" command.
This problem did not exist in 2.5.61 or earlier kernels.

Repeat-by: Build a kernel without the RTC driver, put
"install char-major-10-135 /bin/true" in /etc/modprobe.conf
(new ugly way of saying "alias ... off"), od -c /dev/rtc,
and observe the modprobe error in /var/log/messages.
This will trigger the problem with 100% repeatability for me.

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.

In 2.5.61 and earlier kernels, modprobe is started with SIGCHLD
set to SIG_DFL and not blocked, and system() works normally.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:38 EST