]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net:CXGB4: fix leak if sk_buff is not used
authorÍñigo Huguet <ihuguet@redhat.com>
Wed, 5 May 2021 12:54:50 +0000 (14:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 09:40:54 +0000 (11:40 +0200)
commit027926f4ff864e0cde03a4e72babb511c7454394
treebebb3dbe7946fb3e3d5a62d9cfcf6c12d3e53393
parent9284b702c8e0e46be9de45feef52c226ae26e52d
net:CXGB4: fix leak if sk_buff is not used

[ Upstream commit 52bfcdd87e83d9e69d22da5f26b1512ffc81deed ]

An sk_buff is allocated to send a flow control message, but it's not
sent in all cases: in case the state is not appropiate to send it or if
it can't be enqueued.

In the first of these 2 cases, the sk_buff was discarded but not freed,
producing a memory leak.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/sge.c