aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-08-14 13:56:25 -0700
committerJakub Kicinski <kuba@kernel.org>2023-08-15 19:18:34 -0700
commit956db0a13b47df7f3d6d624394e602e8bf9b057e (patch)
tree98a6379b884bb9a1986cbb8f9757034f093180c5 /tools/perf/scripts/python/export-to-sqlite.py
parentcf74eb5a5bc867258e7d0b0d1c3c4a60e1e3de2f (diff)
net: warn about attempts to register negative ifindex
Since the xarray changes we mix returning valid ifindex and negative errno in a single int returned from dev_index_reserve(). This depends on the fact that ifindexes can't be negative. Otherwise we may insert into the xarray and return a very large negative value. This in turn may break ERR_PTR(). OvS is susceptible to this problem and lacking validation (fix posted separately for net). Reject negative ifindex explicitly. Add a warning because the input validation is better handled by the caller. Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Link: https://lore.kernel.org/r/20230814205627.2914583-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions