Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757045AbbLWWT0 (ORCPT ); Wed, 23 Dec 2015 17:19:26 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:49472 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbbLWWTZ (ORCPT ); Wed, 23 Dec 2015 17:19:25 -0500 Date: Wed, 23 Dec 2015 17:19:06 -0500 From: Johannes Weiner To: Vladimir Davydov Cc: Andrew Morton , stable@vger.kernel.org, Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to interrupted reclaim Message-ID: <20151223221906.GB12165@cmpxchg.org> References: <1450182697-11049-1-git-send-email-vdavydov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450182697-11049-1-git-send-email-vdavydov@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 40 I think we can fold the following in there as well: >From b885bf06f55d05f0e8249357d4edb231dfe4a5dc Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Wed, 23 Dec 2015 17:16:07 -0500 Subject: [PATCH] mm: memcontrol: fix possible memcg leak due to interrupted reclaim fix When we handled multiple css references in mem_cgroup_iter() it got a little confusing which puts belong to which gets. Now that we only ref the position css it's obvious, and a multi-line comment to explain it gets in the way of reading an already long function. Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 99acd6a..498c61e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -909,10 +909,6 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, */ (void)cmpxchg(&iter->position, pos, memcg); - /* - * pairs with css_tryget when dereferencing iter->position - * above. - */ if (pos) css_put(&pos->css); -- 2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/