Netdev List
 help / color / mirror / Atom feed
* [PATCH iwl-next] ice: fix uninitialized response buffer in ice_acl_create_tbl()
@ 2026-07-09 14:59 Marcin Szycik
  2026-07-10  6:47 ` [Intel-wired-lan] " Loktionov, Aleksandr
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Szycik @ 2026-07-09 14:59 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, anthony.l.nguyen, Marcin Szycik, kernel test robot

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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607022231.FWjSU75X-lkp@intel.com
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c b/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
index a76762e3aa46..4ea08bd9784c 100644
--- a/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
+++ b/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
@@ -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;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-next] ice: fix uninitialized response buffer in ice_acl_create_tbl()
  2026-07-09 14:59 [PATCH iwl-next] ice: fix uninitialized response buffer in ice_acl_create_tbl() Marcin Szycik
@ 2026-07-10  6:47 ` Loktionov, Aleksandr
  0 siblings, 0 replies; 2+ messages in thread
From: Loktionov, Aleksandr @ 2026-07-10  6:47 UTC (permalink / raw)
  To: Marcin Szycik, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Nguyen, Anthony L



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Marcin Szycik
> Sent: Thursday, July 9, 2026 4:59 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Marcin Szycik
> <marcin.szycik@linux.intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>
> 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")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202607022231.FWjSU75X-
> lkp@intel.com
> Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> 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(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
> b/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
> index a76762e3aa46..4ea08bd9784c 100644
> --- a/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
> +++ b/drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
> @@ -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;
> --
> 2.49.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-10  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 14:59 [PATCH iwl-next] ice: fix uninitialized response buffer in ice_acl_create_tbl() Marcin Szycik
2026-07-10  6:47 ` [Intel-wired-lan] " Loktionov, Aleksandr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox