ibmvnic: Check for NULL skb's in NAPI poll routine
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Tue, 20 Feb 2018 02:12:57 +0000 (20:12 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:51:59 +0000 (07:51 +0200)
commit2e9f41ace36b52039ce195a9109cb221a8ad93d2
tree2dd5731b125a525f29f734afad67dd19c74ea374
parent775cc792bb0879d65f7fa446ce4bd82096447e34
ibmvnic: Check for NULL skb's in NAPI poll routine

[ Upstream commit abe27a885d9e6575e663a16176dabc58ce9d7188 ]

After introduction of commit d0869c0071e4, there were some instances of
RX queue entries from a previous session (before the device was closed
and reopened) returned to the NAPI polling routine. Since the corresponding
socket buffers were freed, this resulted in a panic on reopen. Include
a check for a NULL skb here to avoid this.

Fixes: d0869c0071e4 ("ibmvnic: Clean RX pool buffers during device close")
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c