Re: [PATCH v3] Make initramfs honor CONFIG_DEVTMPFS_MOUNT

From: Rob Landley
Date: Sun Sep 17 2017 - 00:03:43 EST

On 09/14/2017 04:17 AM, Christophe LEROY wrote:
> Le 14/09/2017 Ã 01:51, Rob Landley a Ãcrit :
>> From: Rob Landley <rob@xxxxxxxxxxx>
>> Make initramfs honor CONFIG_DEVTMPFS_MOUNT, and move
>> /dev/console open after devtmpfs mount.
>> Add workaround for Debian bug that was copied by Ubuntu.
> Is that a bug only for Debian ? Why ?

Look down, specifically this bit:

>> v2 discussion:

That's some discussion of version 2 of this patch, which was merged for
a while last dev cycle, then backed out again because it triggered the
same bug in a number of system init scripts:

All of whom copied the broken error "recovery" path from debian. If they
checked whether it was already mounted, or didn't _blank_ the /dev
directory in response to mounting the exact same filesystem over itself
giving -EBUSY, the system would work fine. Heck, if you built a kernel
with a static /dev in initramfs and no devtmpfs configured in, the
script would break things exactly the same way. The breakage is that
script takes a hammer to a perfectly functional /dev directory and then
continues the boot with an empty /dev. That's bonkers.

> Why should a Debian bug be fixed by a workaround in the mainline kernel ?

That was my argument last time, and the answer was "Breaking userspace
is bad, mmmkay." Even when userspace is doing something REALLY OBVIOUSLY
STUPID and it is _clearly_ their fault, as long as they got there first
they've established the status quo and it doesn't matter how silly it is.

This was explicitly stated to me here:

I.E. don't argue with me, argue with him. :)

So, I added a workaround with a printk in hopes of embarassing them into
someday fixing it.