]> git.baikalelectronics.ru Git - kernel.git/commit
igb: Fix oops on changing number of rings
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Mon, 13 Apr 2015 09:15:10 +0000 (18:15 +0900)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 7 May 2015 12:08:32 +0000 (05:08 -0700)
commit11749a8211028f045a1dbff86627a8c83f6d5bce
treed9c431f4c52d1852d29e2f1d638776fd821844d1
parent955dec395702e7caacbae2be8382a465700f5337
igb: Fix oops on changing number of rings

When changing the number of rings by ethtool -L, q_vectors are reused,
which causes oops because of uninitialized pointers.

- When an rx is reused as a tx, q_vector->rx.ring is not set to NULL, which
  misleads igb_poll() to determine that it has an rx ring although it
  actually points to the tx ring.
- When a tx is reused as an rx, q_vector->rx.ring->skb
  (q_vector->ring[0].skb) has a value that was used as tx_stats before.

Fix these problems by zeroing it out on reuseing it.

Fixes: b7fc37bf27e2 ("igb: Fix queue allocation method to accommodate changing during runtime")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c