diff options
author | 2024-02-20 08:11:11 -0800 | |
---|---|---|
committer | 2024-02-21 17:02:28 -0800 | |
commit | e4fe082c38cd74a8fa384bc7542cf3edf1cb7318 (patch) | |
tree | b2b1de93fbe20152f9c068dfe20be1dfe7ed3aee /tools/perf/scripts/python/export-to-postgresql.py | |
parent | net: mctp: put sock on tag allocation failure (diff) | |
download | wireguard-linux-e4fe082c38cd74a8fa384bc7542cf3edf1cb7318.tar.xz wireguard-linux-e4fe082c38cd74a8fa384bc7542cf3edf1cb7318.zip |
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/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions