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:   Wed, 27 Jun 2018 05:10:48 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     paulmck@...ux.vnet.ibm.com
Cc:     Michal Hocko <mhocko@...nel.org>,
        David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm,oom: Bring OOM notifier callbacks to outside of OOM
 killer.

On 2018/06/27 2:03, Paul E. McKenney wrote:
> There are a lot of ways it could be made concurrency safe.  If you need
> me to do this, please do let me know.
> 
> That said, the way it is now written, if you invoke rcu_oom_notify()
> twice in a row, the second invocation will wait until the memory from
> the first invocation is freed.  What do you want me to do if you invoke
> me concurrently?
> 
> 1.	One invocation "wins", waits for the earlier callbacks to
> 	complete, then encourages any subsequent callbacks to be
> 	processed more quickly.  The other invocations return
> 	immediately without doing anything.
> 
> 2.	The invocations serialize, with each invocation waiting for
> 	the callbacks from previous invocation (in mutex_lock() order
> 	or some such), and then starting a new round.
> 
> 3.	Something else?
> 
> 							Thanx, Paul

As far as I can see,

-	atomic_set(&oom_callback_count, 1);
+	atomic_inc(&oom_callback_count);

should be sufficient.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ