Commit 127d0a19 authored by Michal Schmidt's avatar Michal Schmidt Committed by David S. Miller

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: default avatarMichal Schmidt <>
Acked-by: default avatarEilon Greenstein <>
Signed-off-by: default avatarDavid S. Miller <>
parent cc34eb67
...@@ -10901,6 +10901,7 @@ init_ops_alloc_err: ...@@ -10901,6 +10901,7 @@ init_ops_alloc_err:
kfree(bp->init_data); kfree(bp->init_data);
request_firmware_exit: request_firmware_exit:
release_firmware(bp->firmware); release_firmware(bp->firmware);
bp->firmware = NULL;
return rc; return rc;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment