linux_dsm_epyc7002/drivers/net/ethernet/intel/ixgbevf
Alexander Duyck eb022d058f ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparam
In ixgbevf_get_ringparam we could run into a NULL pointer dereference
if the rings were not allocated when we attempted the call.  To prevent
that we can just access the tx/rx_ring_count values instead of attempting
to access the rings to get the count.

This change corrects a memory leak and memory corruption in
ixgbevf_set_ringparam.

The memory leak was due to us not freeing the resources from the ring
before overwriting them.  This change corrects the memory leak by making
certain to call ixgbe_free_tx/rx_resources on the rings prior to freeing
them.

The memory corruption was because we were replacing the rings but not
updating the q_vectors.  It addresses the memory corruption by leaving the
rings in place and instead just copying the contents of the new rings into
the existing rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-18 13:18:24 -07:00
..
defines.h ixgbevf: Consolidate Tx context descriptor creation code 2012-07-18 13:16:37 -07:00
ethtool.c ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparam 2012-07-18 13:18:24 -07:00
ixgbevf_main.c ixgbevf: Consolidate Tx context descriptor creation code 2012-07-18 13:16:37 -07:00
ixgbevf.h ixgbevf: Add netdev to ring structure 2012-07-18 13:14:36 -07:00
Makefile ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
mbx.c ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
mbx.h ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
regs.h ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
vf.c ixgbevf: Add support to recognize 100mb link speed 2012-05-03 02:36:07 -07:00
vf.h ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00