]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Prevent null pointer dereference in AFEX mode
authorYuval Mintz <yuvalmin@broadcom.com>
Wed, 10 Apr 2013 10:34:39 +0000 (13:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Apr 2013 19:27:04 +0000 (15:27 -0400)
commitaf019d22d243cf3da7071737281be3e57ed94a6c
treebca5264257c1fa9ae2c00172f01bac66712ab031
parent9b2e6c3550dd71cfcb1d3af2cd2c86ccd883936b
bnx2x: Prevent null pointer dereference in AFEX mode

The cnic module is responsible for initializing various bnx2x structs
via callbacks provided by the bnx2x module.
One such struct is the queue object for the FCoE queue.

If a device is working in AFEX mode and its configuration allows FCoE yet
the cnic module is not loaded, it's very likely a null pointer dereference
will occur, as the bnx2x will erroneously access the FCoE's queue object.

Prevent said access until cnic properly registers itself.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@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_main.c