diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-02-20 08:11:11 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-01 13:41:58 +0100 |
commit | b6f17f5ebe3c7754ea83544ff8b872c7de43856e (patch) | |
tree | 1381be4acd77301b4e5d529c2f5726ee4a15a07c /tools/perf/scripts/python/export-to-sqlite.py | |
parent | bb09eb475e1c8cf787b44816c3e3bfac93d7f62e (diff) |
tools: ynl: make sure we always pass yarg to mnl_cb_run
[ Upstream commit e4fe082c38cd74a8fa384bc7542cf3edf1cb7318 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions