net/enic: fix crash on MTU update or Rx queue reconfigure
authorJohn Daley <johndale@cisco.com>
Wed, 12 Oct 2016 21:12:02 +0000 (14:12 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 26 Oct 2016 17:38:18 +0000 (19:38 +0200)
commitceeb00b95f89b2c32a23b7e596c3715c70334f8b
tree2ae44e91887e5919e3d62fe85e57f8a24b1400ac
parentc92efcae6de9fc9410ff9f0d82857b7f87a2e543
net/enic: fix crash on MTU update or Rx queue reconfigure

The incorrect completion queue corresponding to an RQ would be
freed if multiple Rx queues are in use and the MTU is changed,
or an Rx queue is released. This could lead to a segmentation fault
when the device is disabled or even in the Rx or Tx paths.

The index of the completion queue corresponding to a RQ needed
to be adjusted after Rx scatter was introduced.

Fixes: 856d7ba7ed22 ("net/enic: support scattered Rx")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
drivers/net/enic/enic.h
drivers/net/enic/enic_main.c