lkml.org 
[lkml]   [2014]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v4 PATCH 1/1] init: fix race between rootfs mount and firmware loading
On Fri, Sep 19, 2014 at 09:44:24PM +0900, Roman Pen wrote:
> The thing is that built-in modules are being inited before
> rootfs mount. Some of the modules can request firmware loading
> from another thread using async 'request_firmware_nowait' call
> on inition, so we can catch this kind of race:
> rootfs does not exist yet, but we are going to open and load
> firmware file requesting it from the kernel thread.
>
> Solution is simple: before any rootfs access firmware loader
> must wait for rootfs mount.

Even simpler solution, don't do that :)

If your hardware needs firmware this early, and you don't put the
firmare into the initrd/initramfs, then it will just be loaded later on,
when the root filesystem is needed and the driver asks for it again
(your driver is failing "nicely" and allows the firmware to be loaded
later, right? If not, that should be fixed...)

Or, build the firmware into the kernel, I think we still have that
option for some drivers that really wanted/needed this.

What has changed recently that requires this type of patch? What is
wrong with the above solutions?

thanks,

greg k-h


\
 
 \ /
  Last update: 2014-09-20 00:21    [W:0.094 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site