ice: fix uninitialized response buffer in ice_acl_create_tbl()
Subsystems (3)
PATCH 1/1 ice: fix uninitialized response buffer in ice_acl_create_tbl()
Buffer is uninitialized in error path. Move assignment before goto. This buffer is only used for response, so its content doesn't matter.
---
Tony, please squash this with the offending commit. It's not applied yet, so hash is invalid, but I don't want to resend a ~5000 line patchset just to move one line.
--- drivers/net/ethernet/intel/ice/ice_acl_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_acl_ctrl.c +2 -2
@@ -354,14 +354,14 @@ int ice_acl_create_tbl(struct ice_hw *hw, struct ice_acl_tbl_params *params)return -ENOMEM ; } + resp_buf = &tbl_alloc.buf.resp_buf; + tbl =kzalloc_obj (*tbl);if (!tbl) { err = -ENOMEM ; goto err_dealloc_tbl; } - resp_buf = &tbl_alloc.buf.resp_buf; -/* Retrieve information of the allocated table */ tbl->id = alloc_id; tbl->first_tcam = resp_buf->ops.table.first_tcam;
Signature · 1 line
2.49.0
Quoted 51 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Marcin Szycik
Sent: Thursday, July 9, 2026 4:59 PM
To: [email protected]
Cc: [email protected]; Marcin Szycik <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: fix uninitialized response buffer inice_acl_create_tbl()Buffer is uninitialized in error path. Move assignment before goto. This buffer is only used for response, so its content doesn't matter.
Fixes d80ee68614c3 ("ice: initialize ACL table")Reported-by kernel test robot <[email protected]>Signed-off-by Marcin Szycik <[email protected]>---
Tony, please squash this with the offending commit. It's not applied yet, so hash is invalid, but I don't want to resend a ~5000 line patchset just to move one line.--- drivers/net/ethernet/intel/ice/ice_acl_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/ice/ice_acl_ctrl.c +2
-2@@ -354,14 +354,14 @@ int ice_acl_create_tbl(struct ice_hw *hw, struct ice_acl_tbl_params *params)return -ENOMEM ; } + resp_buf = &tbl_alloc.buf.resp_buf; + tbl =kzalloc_obj (*tbl);if (!tbl) { err = -ENOMEM ; goto err_dealloc_tbl; } - resp_buf = &tbl_alloc.buf.resp_buf; -/* Retrieve information of the allocated table */ tbl->id = alloc_id;
Quoted 3 lines
tbl->first_tcam=resp_buf->ops.table.first_tcam;
--
2.49.0