[Intel-wired-lan] [tnguy-next-queue:dev-queue 20/95] drivers/net/ethernet/intel/ice/ice_parser.c:971 __ice_pg_nm_cam_match() error: memcmp() '&item->key.val' too small (9 vs 13)

2024-06-10 Thread Dan Carpenter
: Dan Carpenter | Closes: https://lore.kernel.org/r/202406100753.38qaqzo9-...@intel.com/ smatch warnings: drivers/net/ethernet/intel/ice/ice_parser.c:971 __ice_pg_nm_cam_match() error: memcmp() '&item->key.val' too small (9 vs 13) vim +971 drivers/net/ethernet/intel

[Intel-wired-lan] [tnguy-next-queue:dev-queue 12/92] drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c:875 ice_vc_fdir_parse_raw() warn: missing error code 'status'

2024-07-08 Thread Dan Carpenter
robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202407070634.atz9naa1-...@intel.com/ smatch warnings: drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c:875 ice_vc_fdir_parse_raw() warn: missing error code 'status' vim +/status +875 drivers/net/ethernet

[Intel-wired-lan] [bug report] idpf: add core init and interrupt request

2024-07-19 Thread Dan Carpenter
idpf_send_dealloc_vectors_msg(adapter); ^^^ Inside this function 418 419 return err; 420 } regards, dan carpenter

[Intel-wired-lan] [bug report] ice: add parser execution main loop

2024-08-20 Thread Dan Carpenter
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", 141 key[0], key[1], key[2], key[3], key[4], 142 key[5], key[6], key[7], key[8], key[9]); 143 ice_debug(rt->psr->hw, ICE_DBG_PARSER, "\n"); 144 } regards, dan carpenter

[Intel-wired-lan] [PATCH net-next] ice: Fix a 32bit bug

2024-08-20 Thread Dan Carpenter
BIT() is unsigned long but ->pu.flg_msk and ->pu.flg_val are u64 type. On 32 bit systems, unsigned long is a u32 and the mismatch between u32 and u64 will break things for the high 32 bits. Fixes: 9a4c07aaa0f5 ("ice: add parser execution main loop") Signed-off-by: Dan Carpenter

Re: [Intel-wired-lan] [PATCH net-next] idpf: Slightly simplify memory management in idpf_add_del_mac_filters()

2024-08-23 Thread Dan Carpenter
n > + * so IDPF_NUM_FILTERS_PER_MSG entries are > + * available > + */ > memset(ma_list, 0, buf_size); > } It would be even nicer to move the ma_list allocation outside the loop: buf_size = struct_size(ma_list, mac_addr_list, IDPF_NUM_FILTERS_PER_MSG); ma_list = kmalloc(buf_size, GFP_ATOMIC); regards, dan carpenter

[Intel-wired-lan] [PATCH net] igc: Unlock on error in igc_io_resume()

2024-08-29 Thread Dan Carpenter
Call rtnl_unlock() on this error path, before returning. Fixes: bc23aa949aeb ("igc: Add pcie error handler support") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igc/igc

Re: [Intel-wired-lan] [PATCH iwl-next v1] ixgbe: Convert ret val type from s32 to int

2024-01-04 Thread Dan Carpenter
/archive/20240104/202401041701.6qktszmx-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter

Re: [Intel-wired-lan] [PATCH iwl-next v3 2/3] ixgbe: Fix smatch warnings after type convertion

2024-01-18 Thread Dan Carpenter
_lcd_t_x550em() > warn: missing error code? 'status' > > Fix it by clearly stating returning error code as 0. > > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/r/202401041701.6qktszmx-...@intel.com/ > Fixes: 6ac74

[Intel-wired-lan] [bug report] ice: implement dpll interface to control cgu

2024-01-23 Thread Dan Carpenter
&ice_dpll_rclk_ops, &pf->dplls.rclk); 1588 } 1589 ice_dpll_release_pins(pin, ICE_DPLL_RCLK_NUM_PER_PF); --> 1590 return ret; 1591 } regards, dan carpenter

[Intel-wired-lan] [bug report] ixgbe: add VF IPsec management

2024-02-09 Thread Dan Carpenter
g and those have a higher risk of false positives. Plus the longer the call tree the higher the chance of false positives. However, I did review it and the warning looks reasonable. regards, dan carpenter

[Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-16 Thread Dan Carpenter
Automatically cleaned up pointers need to be initialized before exiting their scope. In this case, they need to be initialized to NULL before any return statement. Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage") Signed-off-by: Dan Carpenter --- drivers/net/ethernet

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-18 Thread Dan Carpenter
e > >any return statement. > > > >Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage") > >Signed-off-by: Dan Carpenter > >--- > > drivers/net/ethernet/intel/ice/ice_common.c | 4 ++-- > > drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- >

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-19 Thread Dan Carpenter
On Tue, Mar 19, 2024 at 12:43:17PM -0700, Jakub Kicinski wrote: > On Sat, 16 Mar 2024 12:44:40 +0300 Dan Carpenter wrote: > > - struct ice_aqc_get_phy_caps_data *pcaps __free(kfree); > > - void *mac_buf __free(kfree); > > + struct ice_aqc_get_phy_caps_data *pcaps

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Dan Carpenter
The auto_kfree looks like a variable to my eyes. I'd prefer something like: #define __FREE(p) p __free(kfree) = NULL struct ice_aqc_get_phy_caps_data *__FREE(pcaps); regards, dan carpenter

[Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Dan Carpenter
Automatically cleaned up pointers need to be initialized before exiting their scope. In this case, they need to be initialized to NULL before any return statement. Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage") Signed-off-by: Dan Carpenter --- v2: I missed a couple poin

Re: [Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Dan Carpenter
On Thu, Mar 21, 2024 at 04:34:37PM +0100, Jiri Pirko wrote: > >The change to ice_update_link_info() isn't required because it's > >assigned on the very next line... But I did that because it's harmless > >and makes __free() stuff easier to verify. I felt like moving the > >declarations into the c

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Dan Carpenter
is. Kent Overstreet has said we should move away from declarations at the top generally. I don't know if anyone else agrees with him though. regards, dan carpenter

Re: [Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Dan Carpenter
Markus please don't do this. Don't take a controversial opinion and start trying to force it on everyone via review comments and an automatic converstion script. regards, dan carpenter

Re: [Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-24 Thread Dan Carpenter
* Did you extend detection support in the source code analysis tool “Smatch” > for a questionable implementation detail? Yes. Smatch detects this as an uninitialized variable. regards, dan carpenter

Re: [Intel-wired-lan] [PATCH net-next v6 15/21] ip_tunnel: use a separate struct to store tunnel params in the kernel

2024-04-04 Thread Dan Carpenter
p->iph, min(sizeof(p.iph), sizeof(kp->iph))); And this memcpy() doesn't necessarily clear the whole of p.iph. > + > + return !copy_to_user(data, &p, sizeof(p)); > +} regards, dan carpenter

[Intel-wired-lan] [PATCH net-next] ice: Fix a couple NULL vs IS_ERR() bugs

2024-09-14 Thread Dan Carpenter
The ice_repr_create() function returns error pointers. It never returns NULL. Fix the callers to check for IS_ERR(). Fixes: 977514fb0fa8 ("ice: create port representor for SF") Fixes: 415db8399d06 ("ice: make representor code generic") Signed-off-by: Dan Carpenter ---

[Intel-wired-lan] [PATCH net-next] ice: Fix a NULL vs IS_ERR() check in probe()

2024-09-14 Thread Dan Carpenter
The ice_allocate_sf() function returns error pointers on error. It doesn't return NULL. Update the check to match. Fixes: 177ef7f1e2a0 ("ice: base subfunction aux driver") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/ice/ice_sf_eth.c | 4 ++-- 1 file changed, 2 i

Re: [Intel-wired-lan] [PATCH net-next] iavf: Avoid a memory allocation in iavf_print_link_message()

2023-10-04 Thread Dan Carpenter
ause I don't view truncating strings as a note worthy bug... Smatch also gets stuff wrong, but in that case I just always encourage people to mark the warning as old news and move on. Only new warnings are interesting. I feel like as we incorporate more and more static analysis into our processe

[Intel-wired-lan] [PATCH net] ixgbe: fix crash with empty VF macvlan list

2023-10-05 Thread Dan Carpenter
The adapter->vf_mvs.l list needs to be initialized even if the list is empty. Otherwise it will lead to crashes. Fixes: c6bda30a06d9 ("ixgbe: Reconfigure SR-IOV Init") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++-- 1 file changed, 3 ins

[Intel-wired-lan] [PATCH net-next 1/2] igb: Fix an end of loop test

2023-10-05 Thread Dan Carpenter
se is to just set a flag. Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/igb/igb_main.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/ig

[Intel-wired-lan] [PATCH net-next 2/2] ixgbe: fix end of loop test in ixgbe_set_vf_macvlan()

2023-10-05 Thread Dan Carpenter
for "entry" to be NULL and the comments mention this. I have updated the comments to match the new code. Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper") Signed-off-by: Dan Carpenter --- .../net/ethernet/intel/ixgbe/ixgbe_sriov.c| 19 +++

Re: [Intel-wired-lan] [PATCH net] ixgbe: fix crash with empty VF macvlan list

2023-10-06 Thread Dan Carpenter
On Fri, Oct 06, 2023 at 01:16:27PM +0200, Simon Horman wrote: > On Thu, Oct 05, 2023 at 04:57:02PM +0300, Dan Carpenter wrote: > > The adapter->vf_mvs.l list needs to be initialized even if the list is > > empty. Otherwise it will lead to crashes. > > > > Fixes: c6b

[Intel-wired-lan] [PATCH net v2] ixgbe: fix crash with empty VF macvlan list

2023-10-06 Thread Dan Carpenter
The adapter->vf_mvs.l list needs to be initialized even if the list is empty. Otherwise it will lead to crashes. Fixes: a1cbb15c1397 ("ixgbe: Add macvlan support for VF") Signed-off-by: Dan Carpenter --- v2: Use the correct fixes tag. Thanks, Simon. drivers/net/etherne

Re: [Intel-wired-lan] [PATCH] i40e: add an error code check in i40e_vsi_setup

2023-10-19 Thread Dan Carpenter
rings(). What clean up we need to do depends on vsi->type as well but here we know the type is vsi->type == I40E_VSI_VMDQ2 so it's needs to call the i40e_vsi_clear_rings(). regards, dan carpenter ___ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Re: [Intel-wired-lan] [PATCH v2] i40e: add an error code check in i40e_vsi_setup

2023-10-19 Thread Dan Carpenter
On Fri, Oct 20, 2023 at 10:43:09AM +0800, Su Hui wrote: > check the value of 'ret' after calling 'i40e_vsi_config_rss'. > > Signed-off-by: Su Hui > --- > v2: > - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for > pointing out

Re: [Intel-wired-lan] [PATCH v5 4/5] i40e: Fix broken support for floating VEBs

2023-11-27 Thread Dan Carpenter
| Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202311270851.ie6aegcs-...@intel.com/ New smatch warnings: drivers/net/ethernet/intel/i40e/i40e_main.c:14743 i40e_veb_release() error: potentially dereferencing uninitialized 'vsi'. Old smatch warnings: [ low confidence ] d

[Intel-wired-lan] [PATCH net-next] ice: fix error code in ice_eswitch_attach()

2023-11-27 Thread Dan Carpenter
Set the "err" variable on this error path. Fixes: fff292b47ac1 ("ice: add VF representors one by one") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ne

[Intel-wired-lan] [tnguy-next-queue:dev-queue 50/51] drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2391 ixgbe_clean_rx_irq() error: uninitialized symbol 'xdp_res'.

2024-10-21 Thread Dan Carpenter
-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202410210921.qwq9giqr-...@intel.com/ New smatch warnings: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2391 ixgbe_clean_rx_irq() error: uninitialized symbol 'xdp_res'. vim +/xdp_res +2391 drivers/net/ethernet/intel/ixgbe/ix

[Intel-wired-lan] [tnguy-net-queue:dev-queue 9/14] drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2377 ixgbe_clean_rx_irq() error: uninitialized symbol 'xdp_res'.

2024-11-05 Thread Dan Carpenter
/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202411052110.vjxfpzue-...@intel.com/ New smatch warnings: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2377 ixgbe_clean_rx_irq() error: uninitialized symbol 'xd

[Intel-wired-lan] [tnguy-next-queue:dev-queue 16/69] drivers/net/ethernet/intel/ice/devlink/health.c:95 ice_tx_hang_reporter_dump() warn: variable dereferenced before check 'event' (see line 93)

2024-11-30 Thread Dan Carpenter
test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202411242101.qlvmbflb-...@intel.com/ smatch warnings: drivers/net/ethernet/intel/ice/devlink/health.c:95 ice_tx_hang_reporter_dump() warn: variable dereferenced before check 'event' (see line 93) vim +/event +

Re: [Intel-wired-lan] [PATCH net-next v3 3/6] net: napi: add CPU affinity to napi_config

2025-01-06 Thread Dan Carpenter
-project ab51eccf88f5321e7c60591c5546b254b6afab99) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202501050625.ny1c97ex

[Intel-wired-lan] [bug report] ixgbe: Add link management support for E610 device

2025-01-08 Thread Dan Carpenter
ould be changed or the function name. The comment says that ixgbe_aci_get_netlist_node() returns -ENOENT but actually the only error code it returns is -EOPNOTSUPP. 1126 } regards, dan carpenter

[Intel-wired-lan] [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()

2025-02-12 Thread Dan Carpenter
eated as success. So here the "return -ENOMEM;" is unreachable code. Check for negatives instead. Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/intel/ice/ice_irq.c | 2 +- 1 file changed, 1 insertion(+

[Intel-wired-lan] [bug report] ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()

2025-01-09 Thread Dan Carpenter
} 2118 __page_frag_cache_drain(rx_buffer->page, 2119 rx_buffer->pagecnt_bias); 2120 } 2121 2122 /* clear contents of rx_buffer */ 2123 rx_buffer->page = NULL; 2124 rx_buffer->skb = NULL; 2125 } regards, dan carpenter

[Intel-wired-lan] [PATCH v2 net-next] ice: Fix signedness bug in ice_init_interrupt_scheme()

2025-02-12 Thread Dan Carpenter
e: remove splitting MSI-X between features") Signed-off-by: Dan Carpenter --- v2: Fix my scripts to say [PATCH net-next] Propagate the error code. drivers/net/ethernet/intel/ice/ice_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/i

Re: [Intel-wired-lan] [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()

2025-02-12 Thread Dan Carpenter
urn -ENOMEM; + return vectors; actually does fall within the scope of the patch so I want to change that as well. There is no point in really breaking that into a separate patch from a practical perspective. regards, dan carpenter