Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297674

Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to interrupted reclaim

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to interrupted reclaim
Date 2015-12-23 23:20 +0100
Message-ID <qIZVg-6RM-21@gated-at.bofh.it> (permalink)
References <qFX3A-479-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I think we can fold the following in there as well:

From b885bf06f55d05f0e8249357d4edb231dfe4a5dc Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes@cmpxchg.org>
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 <hannes@cmpxchg.org>
---
 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/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2] mm: memcontrol: fix possible memcg leak due to interrupted reclaim Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-12-15 13:40 +0100
  Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Johannes Weiner <hannes@cmpxchg.org> - 2015-12-15 16:00 +0100
  Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Andrew Morton <akpm@linux-foundation.org> - 2015-12-18 00:10 +0100
    Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-12-18 16:40 +0100
      Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Johannes Weiner <hannes@cmpxchg.org> - 2015-12-18 17:10 +0100
        Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-12-18 17:30 +0100
          Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Andrew Morton <akpm@linux-foundation.org> - 2015-12-18 23:50 +0100
            Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-12-19 10:00 +0100
  Re: [PATCH v2] mm: memcontrol: fix possible memcg leak due to  interrupted reclaim Johannes Weiner <hannes@cmpxchg.org> - 2015-12-23 23:20 +0100

csiph-web