bnx2x: Fix memory leak
authorYuval Mintz <yuvalmin@broadcom.com>
Wed, 24 Apr 2013 01:45:01 +0000 (01:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2013 20:33:53 +0000 (16:33 -0400)
commit2f7a312230e0d24e8913e7eff7b24d34b7092fcd
tree36f7fba230c61646158a3277d27957b2184903df
parentf8f4f61a5a358841c5acf144f6fa13a6b475ec2c
bnx2x: Fix memory leak

There exists an `allocation race' between the CNIC and bnx2x drivers,
in which both drivers allocate the same t2 memory while disregarding a possible
previous allocation.

Additionally, due to the current order of memory releases, some of the
ILT memory in the driver is not released correctly when unloading the driver.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c