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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 17:30:03 +0800
From:   Alex Shi <>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Andrew Morton <>,
        Johannes Weiner <>,
        Shakeel Butt <>,
        Roman Gushchin <>, Michal Hocko <>,
        Yafang Shao <>,
        Alexander Duyck <>,
        Hui Su <>, Wei Yang <>,
Subject: [PATCH next-akpm] mm/memcg: add missed warning in mem_cgroup_lruvec

commit "(mm/memcontrol:rewrite mem_cgroup_page_lruvec())" on mm tree use
mem_cgroup_lruvec to rewrite mem_cgroup_page_lruvec, but it missed a
DEBUG_VM warning as following, since we always charge a page before
return from allocation. Add back this warning is helpful:

	VM_WARN_ON_ONCE_PAGE(!memcg, page);

Signed-off-by: Alex Shi <>
Cc: Andrew Morton <> 
Cc: Johannes Weiner <> 
Cc: Shakeel Butt <> 
Cc: Roman Gushchin <> 
Cc: Michal Hocko <> 
Cc: Yafang Shao <> 
Cc: Alexander Duyck <> 
Cc: Hui Su <>
Cc: Wei Yang <> 
 include/linux/memcontrol.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 925b09ace986..7809020ef7bd 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -618,6 +618,7 @@ static inline struct lruvec *mem_cgroup_lruvec(struct mem_cgroup *memcg,
 		goto out;
+	VM_WARN_ON_ONCE_PAGE(!memcg, page);
 	if (!memcg)
 		memcg = root_mem_cgroup;

Powered by blists - more mailing lists