diff options
author | 2021-11-11 22:09:16 -0500 | |
---|---|---|
committer | 2021-11-16 18:02:46 +0100 | |
commit | 451dc48c806a7ce9fbec5e7a24ccf4b2c936e834 (patch) | |
tree | 656789866dd54a4d881c91127155686a4f826264 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue (diff) | |
download | linux-dev-451dc48c806a7ce9fbec5e7a24ccf4b2c936e834.tar.xz linux-dev-451dc48c806a7ce9fbec5e7a24ccf4b2c936e834.zip |
net: ieee802154: handle iftypes as u32
This patch fixes an issue that an u32 netlink value is handled as a
signed enum value which doesn't fit into the range of u32 netlink type.
If it's handled as -1 value some BIT() evaluation ends in a
shift-out-of-bounds issue. To solve the issue we set the to u32 max which
is s32 "-1" value to keep backwards compatibility and let the followed enum
values start counting at 0. This brings the compiler to never handle the
enum as signed and a check if the value is above NL802154_IFTYPE_MAX should
filter -1 out.
Fixes: f3ea5e44231a ("ieee802154: add new interface command")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20211112030916.685793-1-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions