Re: [PATCH 1/1] init: fix race between rootfs mount and firmware loading

2014-09-17 Thread Oleg Nesterov
On 09/17, Roman Peniaev wrote: > > On Tue, Sep 16, 2014 at 1:39 AM, Oleg Nesterov wrote: > > On 09/15, Roman Pen wrote: > >> > > > > Otherwise wait_for_rootfs() can return only once, the next call will block > > forever. And perhaps it would be better to use another primitive, even if > > UINT_MAX

Re: [PATCH 1/1] init: fix race between rootfs mount and firmware loading

2014-09-17 Thread Roman Peniaev
On Tue, Sep 16, 2014 at 1:39 AM, Oleg Nesterov wrote: > On 09/15, Roman Pen wrote: >> >> +static DECLARE_COMPLETION(rootfs_mounted); >> + >> +void wait_for_rootfs(void) >> +{ >> + /* Avoid waiting for ourselves */ >> + if (is_global_init(current)) >> + pr_warn("it is not a good

Re: [PATCH 1/1] init: fix race between rootfs mount and firmware loading

2014-09-15 Thread Oleg Nesterov
On 09/15, Roman Pen wrote: > > +static DECLARE_COMPLETION(rootfs_mounted); > + > +void wait_for_rootfs(void) > +{ > + /* Avoid waiting for ourselves */ > + if (is_global_init(current)) > + pr_warn("it is not a good idea to wait for rootfs mount from > init task\n"); > + els