]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Protect against VFs' ndos when SR-IOV is disabled
authorAriel Elior <ariele@broadcom.com>
Mon, 19 Aug 2013 06:12:00 +0000 (09:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Aug 2013 07:21:47 +0000 (00:21 -0700)
commit1a9d845ad3487bd6d26505e538f849570fbe9cf5
tree17f917d9b23ce1f98fbdf72dd1b32a08b106abe4
parented1b82566dd8dae962263cedb993d80a51046835
bnx2x: Protect against VFs' ndos when SR-IOV is disabled

Since SR-IOV can be activated dynamically and iproute2 can be called
asynchronously, the various callbacks need a robust sanity check before
attempting to access the SR-IOV database and members since there are numerous
states in which it can find the driver (e.g., PF is down, sriov was not enabled
yet, VF is down, etc.).

In many of the states the callback result will be null pointer dereference.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c