]> git.droids-corp.org - dpdk.git/commit
examples/qos_sched: fix core mask overflow
authorMegha Ajmera <megha.ajmera@intel.com>
Wed, 23 Feb 2022 17:36:30 +0000 (17:36 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 25 Feb 2022 09:39:26 +0000 (10:39 +0100)
commit9c9fad3dfa042ae4b7a045cb1731f8701f8210e6
treefdb6e67539b33968cc742d9212f65ffcaddd8b68
parentd91c4b1bb5a938734fe8e66da8f965304919f38e
examples/qos_sched: fix core mask overflow

Masking of core mask was incorrect. Instead of using 1U for shifting, it
should be using 1LU as the result is assigned to uint64.

CID 375859: Potentially overflowing expression "1U << app_main_core" with
type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression of
type "uint64_t" (64 bits, unsigned).

Coverity issue: 375859
Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org
Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
examples/qos_sched/args.c