This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit be82507
mm, slab: clean up slab->obj_exts always
When memory allocation profiling is disabled at runtime or due to an
error, shutdown_mem_profiling() is called: slab->obj_exts which
previously allocated remains.
It won't be cleared by unaccount_slab() because of
mem_alloc_profiling_enabled() not true. It's incorrect, slab->obj_exts
should always be cleaned up in unaccount_slab() to avoid following error:
[...]BUG: Bad page state in process...
..
[...]page dumped because: page still charged to cgroup
[andriy.shevchenko@linux.intel.com: fold need_slab_obj_ext() into its only user]
Fixes: 21c690a ("mm: introduce slabobj_ext to support slab object extensions")
Cc: stable@vger.kernel.org
Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Harry Yoo <harry.yoo@oracle.com>
Tested-by: Harry Yoo <harry.yoo@oracle.com>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Link: https://patch.msgid.link/20250421075232.2165527-1-quic_zhenhuah@quicinc.com
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent d2f5819 commit be82507
1 file changed
+8
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2028 | 2028 | | |
2029 | 2029 | | |
2030 | 2030 | | |
2031 | | - | |
2032 | | - | |
| 2031 | + | |
2033 | 2032 | | |
2034 | 2033 | | |
2035 | 2034 | | |
| |||
2049 | 2048 | | |
2050 | 2049 | | |
2051 | 2050 | | |
2052 | | - | |
2053 | | - | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | 2051 | | |
2065 | 2052 | | |
2066 | 2053 | | |
| |||
2077 | 2064 | | |
2078 | 2065 | | |
2079 | 2066 | | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | 2067 | | |
2086 | 2068 | | |
2087 | 2069 | | |
| |||
2129 | 2111 | | |
2130 | 2112 | | |
2131 | 2113 | | |
2132 | | - | |
| 2114 | + | |
2133 | 2115 | | |
2134 | 2116 | | |
2135 | 2117 | | |
| |||
2601 | 2583 | | |
2602 | 2584 | | |
2603 | 2585 | | |
2604 | | - | |
2605 | | - | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
2606 | 2592 | | |
2607 | 2593 | | |
2608 | 2594 | | |
| |||
0 commit comments