]> git.karo-electronics.de Git - karo-tx-linux.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)
commit34d5626afc39c43d63ec7781b648091e92fae45a
tree0139c0cc43a8ef4b80a59f3dd15b09892a850e2e
parentc730b170456d9139c3c1f8a9c1f91837be657d60
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