diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-03-15 15:08:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-16 09:57:26 +0100 |
commit | 127d0a198a310970b31866af8bbb6d4b1068e546 (patch) | |
tree | 4577367c5ea665a2f7ffd53eeef2c0409a2e7af5 | |
parent | sch_sfq: revert dont put new flow at the end of flows (diff) | |
download | linux-127d0a198a310970b31866af8bbb6d4b1068e546.tar.xz linux-127d0a198a310970b31866af8bbb6d4b1068e546.zip |
bnx2x: fix a crash on corrupt firmware file
If the requested firmware is deemed corrupt and then released, reset the
pointer to NULL in order to avoid double-freeing it in
bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware().
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 254521319150..00ff62f92858 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -10901,6 +10901,7 @@ init_ops_alloc_err: kfree(bp->init_data); request_firmware_exit: release_firmware(bp->firmware); + bp->firmware = NULL; return rc; } |