diff options
author | Suren Baghdasaryan <[email protected]> | 2024-06-01 16:38:40 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-06-15 10:43:05 -0700 |
commit | a273559e9eb68cb58c57803d76a1622b8324a878 (patch) | |
tree | 8336be723cd6f1c07c471cb26857e912d7667cb4 /tools/perf/scripts/python/parallel-perf.py | |
parent | c944bf60c16a65ae812a59fd1b66f6c9e18c91c9 (diff) |
lib/alloc_tag: fix RCU imbalance in pgalloc_tag_get()
put_page_tag_ref() should be called only when get_page_tag_ref() returns a
valid reference because only in that case get_page_tag_ref() enters RCU
read section while put_page_tag_ref() will call rcu_read_unlock() even if
the provided reference is NULL. Fix pgalloc_tag_get() which does not
follow this rule causing RCU imbalance. Add a warning in
put_page_tag_ref() to catch any future mistakes.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: cc92eba1c88b ("mm: fix non-compound multi-order memory accounting in __free_pages")
Signed-off-by: Suren Baghdasaryan <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Acked-by: Vlastimil Babka <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions