OpenCloudOS-Kernel/drivers/net/ethernet/broadcom
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
..
bnx2x bnx2x: Change bnx2x_tests_str_arr to static char 2012-06-27 01:20:13 -07:00
Kconfig
Makefile
b44.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-26 21:55:51 -05:00
b44.h
bcm63xx_enet.c bcm63xx-enet: fix PHY name to match MDIO bus name 2012-02-13 16:04:08 -05:00
bcm63xx_enet.h
bnx2.c bnx2: Update version 2.2.2 2012-06-16 22:22:59 -07:00
bnx2.h bnx2: Read PCI function number from internal register 2012-06-16 22:22:59 -07:00
bnx2_fw.h
cnic.c cnic: Fix occasional NULL pointer dereference during reboot. 2012-06-27 21:20:08 -07:00
cnic.h
cnic_defs.h cnic: Fix parity error code conflict 2012-03-21 21:57:36 -04:00
cnic_if.h bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement 2012-06-27 01:20:13 -07:00
sb1250-mac.c drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
tg3.c tg3: Apply short DMA frag workaround to 5906 2012-06-11 16:55:10 -07:00
tg3.h tg3: use netdev_alloc_frag() API 2012-05-19 04:02:12 -04:00