linux/drivers/net/ethernet/intel
Dave Ertman 73e30a62b1 ice: Avoid crash from unnecessary IDA free
In the remove path, there is an attempt to free the aux_idx IDA whether
it was allocated or not.  This can potentially cause a crash when
unloading the driver on systems that do not initialize support for RDMA.
But, this free cannot be gated by the status bit for RDMA, since it is
allocated if the driver detects support for RDMA at probe time, but the
driver can enter into a state where RDMA is not supported after the IDA
has been allocated at probe time and this would lead to a memory leak.

Initialize aux_idx to an invalid value and check for a valid value when
unloading to determine if an IDA free is necessary.

Fixes: d25a0fc41c ("ice: Initialize RDMA support")
Reported-by: Jun Miao <jun.miao@windriver.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2021-10-14 10:14:45 -07:00
..
e1000 ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
e1000e Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
fm10k ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
i40e i40e: Fix freeing of uninitialized misc IRQ vector 2021-10-06 09:49:34 -07:00
iavf iavf: fix double unlock of crit_lock 2021-10-06 09:49:34 -07:00
ice ice: Avoid crash from unnecessary IDA free 2021-10-14 10:14:45 -07:00
igb ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
igbvf ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
igc igc: fix tunnel offloading 2021-09-16 14:29:58 +01:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe ixgbe: Fix NULL pointer dereference in ixgbe_xdp_setup 2021-09-29 10:51:51 +01:00
ixgbevf ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
e100.c e100: fix buffer overrun in e100_get_regs 2021-09-27 08:57:30 -07:00
Kconfig igc: fix build errors for PTP 2021-09-19 12:20:53 +01:00
Makefile