]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Remove VNIC_CLOSING check from pending_scrq
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Thu, 15 Jun 2017 04:50:08 +0000 (23:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jun 2017 18:29:00 +0000 (14:29 -0400)
commit09d0498f4d3da8f76eb7689167a70b624edf3e72
tree2e4f85e0094e33f2b5705f89111af791894a6513
parent4d1bc11547a47a720da8931ed8f1bf7b70e57ccb
ibmvnic: Remove VNIC_CLOSING check from pending_scrq

Fix a kernel panic resulting from data access of a NULL
pointer during device close. The pending_scrq routine is
meant to determine whether there is a valid sub-CRQ message
awaiting processing. When the device is closing, however,
there is a possibility that NULL messages can be processed
because pending_scrq will always return 1 even if there
no valid message in the queue.

It's not clear what this closing state check was originally
meant to accomplish, so just remove it.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c