net/ice: fix storing field offset arg
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 net/ice: fix storing field offset arg
The field offset argument type inside ice driver is of "int" type, but when parsing and storing the value from a devarg, a uint8_t type is used, leading to 3 bytes being potentially uninitialized. Fix this by storing to an int type instead.
Bugzilla ID: 2038
---
Note: this fix is superceded by the kvargs numeric args patchset [1]. However, that patchset relies on new kvargs features unlikely to be backported, so this standalone fix is useful for backporting or if the whole other set doesn't make the 26.11 release.
[1] https://patches.dpdk.org/project/dpdk/list/?series=39247
--- drivers/net/intel/ice/ice_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/ice/ice_ethdev.c +1 -1
@@ -735,7 +735,7 @@ static int handle_field_offs_arg(__rte_unused const char *key, const char *value, void *offs_args) { - uint8_t *offset = offs_args; + int *offset = offs_args;if (value ==NULL || offs_args ==NULL )return -EINVAL ;
Signature · 1 line
2.53.0
Quoted 10 lines · Bruce Richardson
The field offset argument type inside ice driver is of "int" type, but when parsing and storing the value from a devarg, a
uint8_ttype is used, leading to 3 bytes being potentially uninitialized. Fix this by storing to an int type instead.Bugzilla ID: 2038
Fixes df539aaf35cb ("net/ice: refactor flex descriptor protocol field extraction")Signed-off-by Bruce Richardson <[email protected]>
Quoted 8 lines
---
Note: this fix is superceded by the kvargs numeric args patchset [1]. However, that patchset relies on new kvargs features unlikely to be backported, so this standalone fix is useful for backporting or if the whole other set doesn't make the 26.11 release.[1] https://patches.dpdk.org/project/dpdk/list/?series=39247
---
Signature · 2 lines
Thanks, Anatoly
Bruce Richardson
AppliedQuoted 17 lines · Anatoly
Quoted 16 lines · Bruce Richardson
The field offset argument type inside ice driver is of "int" type, but when parsing and storing the value from a devarg, a
uint8_ttype is used, leading to 3 bytes being potentially uninitialized. Fix this by storing to an int type instead.Bugzilla ID: 2038
Fixes df539aaf35cb ("net/ice: refactor flex descriptor protocol field extraction")Signed-off-by Bruce Richardson <[email protected]>---
Note: this fix is superceded by the kvargs numeric args patchset [1]. However, that patchset relies on new kvargs features unlikely to be backported, so this standalone fix is useful for backporting or if the whole other set doesn't make the 26.11 release.
Quoted 6 lines
Quoted 2 lines
[1] https://patches.dpdk.org/project/dpdk/list/?series=39247
---Acked-by Anatoly Burakov <[email protected]>
Applied to dpdk-next-net-intel.
/Bruce