]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Fix move FP memory deallocations
authorYuval Mintz <yuvalmin@broadcom.com>
Tue, 27 Aug 2013 22:13:01 +0000 (01:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2013 02:03:04 +0000 (22:03 -0400)
commit4635fd3377dc1d0d2ddfc648de6c2a1c0c6e88ec
tree0139c0cc43a8ef4b80a59f3dd15b09892a850e2e
parent3d922efdf9d6bba45b389342877018f2451fc74d
bnx2x: Fix move FP memory deallocations

If driver will fail to allocate all queues, it will shrink the number of
queues and move the storage queue to its correct place (i.e., the last
queue among the newly supported number).

When changing the pointers of the new location of the FCoE queue, we need
to pay special attention to the aggregations pointer - that memory is allocated
during probe and released upon driver removal. Current implementation has 2
pointers pointing to the same chunk of allocated memory, meaning upon removal
there will be two kfree() of the same chunk while the other won't be released.

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