lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Sep 2014 19:28:12 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roman Peniaev <r.peniaev@...il.com>
Cc:	Ming Lei <ming.lei@...onical.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [v2 PATCH 1/1] init: fix race between rootfs mount and
	firmware loading

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,

>                                           LOCK
>                                           add to the list
>                                           rmb            <<< now we
> see CONDITION

Yes, but note that "now we see CONDITION" is true right after LOCK,
not sure what does this "rmb" in your pseudo mean. If you meant mb()
implied by set_current_state(), please see the comment above
prepare_to_wait().

>                                           UNLOCK
>
>                                           check CONDITION <<< it is
> set, we are woken up

Yes. In short, we rely on wait_queue_head_t->lock. Once a CPU takes
this lock, it should see all changes done by another CPU before it
released the same lock.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ