]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnx2x: fix a crash on corrupt firmware file
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 15 Mar 2012 14:08:28 +0000 (14:08 +0000)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 14:51:40 +0000 (22:51 +0800)
commite4c344456dc71f27735c2cb3ae3137bef5099c72
tree1a49adf3f72ce2515754759024f68295080ecdf5
parent3b2008da0bd873df7372f8904f7394d9ec8f6993
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().

(cherry picked from commit 127d0a198a310970b31866af8bbb6d4b1068e546)
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/bnx2x/bnx2x_main.c