qede: Fix system crash on configuring channels.
authorSudarsana Reddy Kalluru <skalluru@marvell.com>
Wed, 6 Feb 2019 22:43:45 +0000 (14:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Feb 2019 00:53:33 +0000 (16:53 -0800)
commit0aa4febb420d91df5b56b1864a2465765da85f4b
treeb50f69ac73d7040e6c08bfb15f65e92ac4bebd59
parentfb1faab74ddef9ec2d841d54e5d0912a097b3abe
qede: Fix system crash on configuring channels.

Under heavy traffic load, when changing number of channels via
ethtool (ethtool -L) which will cause interface to be reloaded,
it was observed that some packets gets transmitted on old TX
channel/queue id which doesn't really exist after the channel
configuration leads to system crash.

Add a safeguard in the driver by validating queue id through
ndo_select_queue() which is called before the ndo_start_xmit().

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede.h
drivers/net/ethernet/qlogic/qede/qede_fp.c
drivers/net/ethernet/qlogic/qede/qede_main.c