lkml.org 
[lkml]   [2014]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v3 PATCH 1/1] init: fix race between rootfs mount and firmware loading
On 09/18, Roman Pen wrote:
>
> +void wait_for_rootfs(void)
> +{
> + /* Avoid waiting for ourselves */
> + if (WARN_ON(is_global_init(current)))
> + return;
> + else
> + wait_event(rootfs_waitq, rootfs_mounted);
> +}

Ah, wait, the is_global_init() check doesn't look right in any case.

What if /sbin/init does sys_init_module() and this module does
request_firmware() ?

I think we should only warn if init is going to wait,

/* Avoid waiting for ourselves */
if (rootfs_mounted || WARN_ON(is_global_init(current)))
return;

__wait_event(rootfs_waitq, rootfs_mounted);


> +EXPORT_SYMBOL(wait_for_rootfs);

Why?

Oleg.



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