Browse files

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 <>
Acked-by: Eilon Greenstein <>
Signed-off-by: David S. Miller <>
  • Loading branch information...
1 parent cc34eb6 commit 127d0a198a310970b31866af8bbb6d4b1068e546 @michich michich committed with davem330 Mar 15, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10901,6 +10901,7 @@ int bnx2x_init_firmware(struct bnx2x *bp)
+ bp->firmware = NULL;
return rc;

0 comments on commit 127d0a1

Please sign in to comment.