Skip to contentSkip to conversation

ice: fix uninitialized response buffer in ice_acl_create_tbl()

PATCH In review Marcin Szycik 2 participants 2 messages Jul 9 – Jul 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index a76762e3aa46..4ea08bd9784c 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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 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.

Fixes d80ee68614c3 ("ice: initialize ACL table")

[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
index a76762e3aa46..4ea08bd9784c 100644
@@ -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