]> 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)
commit35ff0adfd10b447722b31311cd408eefdd69554a
tree36f7fba230c61646158a3277d27957b2184903df
parent7c26c339513a63494cb918c7cb4c0848145a4e77
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