summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorChao Shi <coshi036@gmail.com>2026-08-06 12:58:27 -0400
committerChristian Brauner <brauner@kernel.org>2026-09-10 09:27:23 +0200
commit8775d14a90e29fafa8b556e07d8142042fd58689 (patch)
treeaa80473165ff59ac702ea1e57eb8b26d63ff258e /tools/perf/scripts/python/stackcollapse.py
parent3c9ab45852f6368a3c9d5c18451de7d1f893cc74 (diff)
buffer: read the folio's mapping directly in buffer_set_crypto_ctx()
folio_mapping() was doing two jobs here. One was to turn a slab folio into NULL, which is what made this safe for jbd2's shadow buffers; the previous patch removed the need for that by giving those buffers no folio at all. The other is a hazard. folio_mapping() maps a folio in the swap cache to its swap_address_space, so if a buffer_head were ever attached to such a folio this would hand fscrypt a swap mapping and dereference ->host on it. There is no reason to want that here: this path wants the file's mapping or nothing. Read ->mapping directly. Buffers with no folio are already handled above. Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Weidong Zhu <weizhu@fiu.edu> Signed-off-by: Chao Shi <coshi036@gmail.com> Link: https://patch.msgid.link/3fe72ec37bf8491a69031db5f3ba1319da935b97.1785951556.git.coshi036@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions