On 09/18, Roman Peniaev wrote:
>
> If my final understanding is right (please, correct me if I am still wrong),
> following reordering can happen, but we are fine with it:
>
> wake_up_rootfs wait_event
>
> LOCK
> check the list, but empty
> set CONDITION <<< reordered
> UNLOCK
On Thu, Sep 18, 2014 at 2:46 AM, Oleg Nesterov wrote:
> On 09/17, Roman Pen wrote:
>>
>> +void wait_for_rootfs(void)
>> +{
>> + /* Avoid waiting for ourselves */
>> + if (is_global_init(current))
>> + pr_warn("init: it is not a good idea to wait for the rootfs
>> mount from
On Thu, Sep 18, 2014 at 2:46 AM, Oleg Nesterov o...@redhat.com wrote:
On 09/17, Roman Pen wrote:
+void wait_for_rootfs(void)
+{
+ /* Avoid waiting for ourselves */
+ if (is_global_init(current))
+ pr_warn(init: it is not a good idea to wait for the rootfs
mount from
On 09/18, Roman Peniaev wrote:
If my final understanding is right (please, correct me if I am still wrong),
following reordering can happen, but we are fine with it:
wake_up_rootfs wait_event
LOCK
check the list, but empty
set CONDITION reordered
UNLOCK
Yes,
On 09/17, Roman Pen wrote:
>
> +void wait_for_rootfs(void)
> +{
> + /* Avoid waiting for ourselves */
> + if (is_global_init(current))
> + pr_warn("init: it is not a good idea to wait for the rootfs
> mount from the init task\n");
> + else
> +
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
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
On 09/17, Roman Pen wrote:
+void wait_for_rootfs(void)
+{
+ /* Avoid waiting for ourselves */
+ if (is_global_init(current))
+ pr_warn(init: it is not a good idea to wait for the rootfs
mount from the init task\n);
+ else
+ wait_event(rootfs_waitq,
8 matches
Mail list logo