]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc6179208305d27061580d15b2ab34b0d2843c930
tree36f7fba230c61646158a3277d27957b2184903df
parentb0c92a9f04da6a89ba442d48ca4745937f4543e7
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