]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4vf: fix memleak in mac_hlist initialization
authorArjun Vynipadath <arjun@chelsio.com>
Fri, 9 Nov 2018 09:22:01 +0000 (14:52 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 23:18:22 +0000 (15:18 -0800)
commited5cd7978ba97efdea8c49e66413b2b869c98fe9
treee79c520ef8c56549d86ed8c88778c1e488f6ec24
parent86a35f074d40415119c95513152de504622fc9f9
cxgb4vf: fix memleak in mac_hlist initialization

mac_hlist was initialized during adapter_up, which will be called
every time a vf device is first brought up, or every time when device
is brought up again after bringing all devices down. This means our
state of previous list is lost, causing a memleak if entries are
present in the list. To fix that, move list init to the condition
that performs initial one time adapter setup.

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c