diff options
author | Alexander Duyck <[email protected]> | 2012-07-19 00:18:05 +0000 |
---|---|---|
committer | Jeff Kirsher <[email protected]> | 2012-07-18 13:18:24 -0700 |
commit | eb022d058f5ad48c45f1f31c36865d2c676aedc9 (patch) | |
tree | ed8882add51bc4944c54c5a19cfdd78acb037413 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 70a10e258ce3d45b294de9190dee9dcc73a495cb (diff) |
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 <[email protected]>
Acked-by: Greg Rose <[email protected]>
Tested-by: Sibai Li <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions