All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, sh_def@163.com, shakeelb@google.com,
	sfr@canb.auug.org.au, richard.weiyang@gmail.com, mhocko@suse.com,
	laoar.shao@gmail.com, hannes@cmpxchg.org, guro@fb.com,
	alex.shi@linux.alibaba.com, alexander.h.duyck@linux.intel.com,
	lstoakes@gmail.com
Subject: [folded-merged] mm-memcontrol-rewrite-mem_cgroup_page_lruvec-fix-fix.patch removed from -mm tree
Date: Fri, 18 Dec 2020 12:05:58 -0800	[thread overview]
Message-ID: <20201218200558.6RuZ6%akpm@linux-foundation.org> (raw)


The patch titled
     Subject: mm/memcg: warn on missing memcg on mem_cgroup_page_lruvec()
has been removed from the -mm tree.  Its filename was
     mm-memcontrol-rewrite-mem_cgroup_page_lruvec-fix-fix.patch

This patch was dropped because it was folded into mm-memcontrol-rewrite-mem_cgroup_page_lruvec.patch

------------------------------------------------------
From: Lorenzo Stoakes <lstoakes@gmail.com>
Subject: mm/memcg: warn on missing memcg on mem_cgroup_page_lruvec()

Move memcg check to mem_cgroup_page_lruvec() as there are callers which
may invoke this with !memcg in mem_cgroup_lruvec(), whereas they should
not in mem_cgroup_page_lruvec().

We expect that we have always charged a page to the memcg before
mem_cgroup_page_lruvec() is invoked, so add a warning to assert that this
is the case.

Link: https://lkml.kernel.org/r/20201125112202.387009-1-lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reported-by: syzbot+ce635500093181f39c1c@syzkaller.appspotmail.com
Acked-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Yafang Shao <laoar.shao@gmail.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Hui Su <sh_def@163.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/memcontrol.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/include/linux/memcontrol.h~mm-memcontrol-rewrite-mem_cgroup_page_lruvec-fix-fix
+++ a/include/linux/memcontrol.h
@@ -613,8 +613,6 @@ static inline struct lruvec *mem_cgroup_
 	struct mem_cgroup_per_node *mz;
 	struct lruvec *lruvec;
 
-	VM_WARN_ON_ONCE(!memcg);
-
 	if (mem_cgroup_disabled()) {
 		lruvec = &pgdat->__lruvec;
 		goto out;
@@ -646,7 +644,10 @@ out:
 static inline struct lruvec *mem_cgroup_page_lruvec(struct page *page,
 						struct pglist_data *pgdat)
 {
-	return mem_cgroup_lruvec(page_memcg(page), pgdat);
+	struct mem_cgroup *memcg = page_memcg(page);
+
+	VM_WARN_ON_ONCE_PAGE(!memcg, page);
+	return mem_cgroup_lruvec(memcg, pgdat);
 }
 
 static inline bool lruvec_holds_page_lru_lock(struct page *page,
_

Patches currently in -mm which might be from lstoakes@gmail.com are

mm-memcontrol-rewrite-mem_cgroup_page_lruvec.patch


                 reply	other threads:[~2020-12-18 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201218200558.6RuZ6%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alex.shi@linux.alibaba.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lstoakes@gmail.com \
    --cc=mhocko@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=richard.weiyang@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=sh_def@163.com \
    --cc=shakeelb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.