diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-02-20 08:11:11 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-21 17:02:28 -0800 |
commit | e4fe082c38cd74a8fa384bc7542cf3edf1cb7318 (patch) | |
tree | b2b1de93fbe20152f9c068dfe20be1dfe7ed3aee /tools/perf/scripts/python/stackcollapse.py | |
parent | 9990889be14288d4f1743e4768222d5032a79c27 (diff) |
tools: ynl: make sure we always pass yarg to mnl_cb_run
There is one common error handler in ynl - ynl_cb_error().
It expects priv to be a pointer to struct ynl_parse_arg AKA yarg.
To avoid potential crashes if we encounter a stray NLMSG_ERROR
always pass yarg as priv (or a struct which has it as the first
member).
ynl_cb_null() has a similar problem directly - it expects yarg
but priv passed by the caller is ys.
Found by code inspection.
Fixes: 86878f14d71a ("tools: ynl: user space helpers")
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20240220161112.2735195-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions