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]
Message-ID: <20200803150349.GA502356@cmpxchg.org>
Date:   Mon, 3 Aug 2020 11:03:49 -0400
From:   Johannes Weiner <hannes@...xchg.org>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Roman Gushchin <guro@...com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Lameter <cl@...ux.com>,
        Shakeel Butt <shakeelb@...gle.com>, linux-mm@...ck.org,
        Vlastimil Babka <vbabka@...e.cz>, kernel-team@...com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 05/19] mm: memcontrol: decouple reference counting
 from page accounting

On Mon, Aug 03, 2020 at 11:00:33AM +0200, Michal Hocko wrote:
> On Tue 23-06-20 10:40:23, Roman Gushchin wrote:
> > @@ -5456,7 +5460,10 @@ static int mem_cgroup_move_account(struct page *page,
> >  	 */
> >  	smp_mb();
> >  
> > -	page->mem_cgroup = to; 	/* caller should have done css_get */
> > +	css_get(&to->css);
> > +	css_put(&from->css);
> > +
> > +	page->mem_cgroup = to;
> >  
> >  	__unlock_page_memcg(from);
> 
> What prevents from memcg to be released here?

->attach_task() and kill_css() are exclusive through the cgroup_mutex,
so the base ref cannot disappear from under us during this operation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ