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)
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>

No differences found