linux/drivers/net/ethernet/intel
Joshua Hay b5e5797e3c idpf: only assign num refillqs if allocation was successful
As reported by AI review [1], if the refillqs allocation fails, refillqs
will be NULL but num_refillqs will be non-zero. The release function
will then dereference refillqs since it thinks the refillqs are present,
resulting in a NULL ptr dereference.

Only assign the num refillqs if the allocation was successful. This will
prevent the release function from entering the loop and accessing
refillqs.

[1] https://lore.kernel.org/netdev/20260227035625.2632753-1-kuba@kernel.org/

Fixes: 95af467d9a ("idpf: configure resources for RX queues")
Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2026-03-23 13:29:51 -07:00
..
e1000 e1000/e1000e: Fix leak in DMA error cleanup 2026-03-10 13:02:54 -07:00
e1000e e1000/e1000e: Fix leak in DMA error cleanup 2026-03-10 13:02:54 -07:00
fm10k Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
i40e i40e: fix src IP mask checks and memcpy argument names in cloud filter 2026-03-10 13:02:45 -07:00
iavf iavf: fix out-of-bounds writes in iavf_get_ethtool_stats() 2026-03-23 13:29:50 -07:00
ice ice: use ice_update_eth_stats() for representor stats 2026-03-23 13:29:07 -07:00
idpf idpf: only assign num refillqs if allocation was successful 2026-03-23 13:29:51 -07:00
igb igb: Fix trigger of incorrect irq in igb_xsk_wakeup 2026-03-03 13:06:05 -08:00
igbvf Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
igc igc: fix page fault in XDP TX timestamps handling 2026-03-17 13:28:55 -07:00
ixgbe Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ixgbevf Merge branch '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 2026-02-28 08:43:56 -08:00
libeth libeth, idpf: use truesize as XDP RxQ info frag_size 2026-03-05 08:02:05 -08:00
libie libie: prevent memleak in fwlog code 2026-03-17 14:12:36 -07:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-11-06 09:27:40 -08:00
Makefile libie: fix linking with libie_{adminq,fwlog} when CONFIG_LIBIE=n 2025-09-16 16:18:45 -07:00
e100.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00