Michael Chan a2028b2376 cnic: Fix occasional NULL pointer dereference during reboot.
We register with bnx2x before we allocate ctx_tbl structure, so it is
possible for bnx2x to call cnic_ctl before the structure is allocated.
This can sometimes cause NULL pointer dereference of cp->ctx_tbl.  We
fix this by adding simple checking for valid state before proceeding.
The cnic_ctl call is RCU protected so we don't have to deal with race
conditions.

Because of the additional checking, we need to finish the shutdown
before clearing the CNIC_UP flag.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27 21:20:08 -07:00
..
2012-06-06 09:31:33 -07:00
2012-06-06 09:31:33 -07:00
2012-06-06 09:31:33 -07:00
2012-06-06 09:31:33 -07:00
2012-06-06 09:31:33 -07:00
2012-06-19 00:27:03 -07:00
2012-05-02 20:52:48 -04:00
2012-06-06 09:31:33 -07:00
2012-05-26 12:31:49 -07:00
2012-06-06 09:31:33 -07:00
2012-02-22 14:44:41 -05:00