Re: [PATCH] reboot: disable usermodehelper to prevent fs access

From: Kay Sievers
Date: Thu May 05 2011 - 21:15:29 EST


On Thu, May 5, 2011 at 22:27, Greg KH <greg@xxxxxxxxx> wrote:
> On Thu, May 05, 2011 at 01:32:05PM +0200, Kay Sievers wrote:
>> From: Kay Sievers <kay.sievers@xxxxxxxx>
>> Subject: [PATCH] reboot: disable usermodehelper to prevent fs access
>>
>> In case CONFIG_UEVENT_HELPER_PATH is not set to "", which it
>> should be on every system, the kernel forks processes during
>> shutdown, which try to access the rootfs, even when the
>> binary does not exist. It causes exceptions and long delays in
>> the disk driver, which gets read requests at the time it tries
>> to shut down the disk.
>>
>> This patch disables all kernel-forked processes during reboot to
>> allow a clean poweroff.
>
> Should this also be backported to the -stable kernels as people are
> hitting this problem already today, right?

If it survives fine, I guess it's nothing that will hurt us in
-stable. Suspend/hibernate does the same thing for similar reasons
since a while. Nothing really should use /sbin/hotplug anymore. It
just does not scale with what we do today with kernel devices.

Old udev SYSV init scripts or initramfs used to disable it at bootup.
But recent init systems just don't care anymore. So it just popped up
with systemd, where udev is a plain native service without "legacy
disablement".

So, it might be nice for recently released kernels, on the other hand
it will not cause any problems or data-loos, just a nasty delay at
shutdown, because of a kernel config option UEVENT_HELPER_PATH that is
set wrong for today's systems.

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