summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorXingWang Xiang <v3rdant.xiang@gmail.com>2026-09-02 17:43:17 +0900
committerJakub Kicinski <kuba@kernel.org>2026-09-03 17:21:35 -0700
commit6a1094c34d176827b2b173e163dcc964a13af93f (patch)
tree16eddd62a0e253c5accffd5c9f59c1cabf91e5fe /tools/perf/scripts/python/stackcollapse.py
parent2ac174dfcdde399fa95ba889541fb5e688d8bb35 (diff)
genetlink: pin family module during policy dump
The generic netlink controller's policy dump keeps pointers to the target family's operation and policy tables in its callback state. A dump may be split across multiple skbs and remain pending after the initial request. Netlink pins the module which owns the dump callback, but in this case that is the controller's owner rather than the target family's owner. The target family can consequently be unregistered and its module unloaded while a policy dump is pending. Advancing the dump then dereferences policy memory from the unloaded module. Take a reference to the target family's module when the dump starts. Drop it from the error and done paths. This matches the lifetime for which the dump context retains the family and policy pointers. Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace") Cc: stable@vger.kernel.org Signed-off-by: XingWang Xiang <v3rdant.xiang@gmail.com> Link: https://patch.msgid.link/20260902084317.4092542-1-v3rdant.xiang@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions