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] [day] [month] [year] [list]
Message-ID: <556C8B75.1030405@suse.cz>
Date:	Mon, 01 Jun 2015 18:42:29 +0200
From:	Vlastimil Babka <vbabka@...e.cz>
To:	Michal Hocko <mhocko@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	Vladimir Davydov <vdavydov@...allels.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] memcg: do not call reclaim if !__GFP_WAIT

On 05/29/2015 08:55 AM, Michal Hocko wrote:
> On Thu 28-05-15 12:59:34, Andrew Morton wrote:
>> On Thu, 28 May 2015 20:26:06 +0300 Vladimir Davydov <vdavydov@...allels.com> wrote:
>> 
>> > When trimming memcg consumption excess (see memory.high), we call
>> > try_to_free_mem_cgroup_pages without checking if we are allowed to sleep
>> > in the current context, which can result in a deadlock. Fix this.
>> 
>> Why does it deadlock?  try_to_free_mem_cgroup_pages() is passed the
>> gfp_mask and should honour its __GFP_WAIT setting?
> 
> The only instance of __GFP_WAIT check in vmscan code is in zone_reclaim.
> Page allocations and memcg reclaim avoids calling reclaim if __GFP_WAIT
> is not set. Maybe we can move the check to do_try_to_free_pages?

I think it's conceptually wrong. All other paths check it before calling
into do_try_to_free_pages() and act appropriately. Here it would potentially
mask any atomic-specific fallback strategy.

What would make some sense in do_try_to_free_pages() is VM_WARN_ON_ONCE() which
however I assume doesn't exist? :)

--
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