]> 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)
commit96f87af243c866fcd1a6dfd6159ca3a5c1476151
tree17f917d9b23ce1f98fbdf72dd1b32a08b106abe4
parent15fb1e46c10a0098ac128a29a11d522f81ba5ae2
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