]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mt76: dma: fix a possible memory leak in mt76_add_fragment()
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 26 Jan 2021 11:02:13 +0000 (12:02 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 28 Jan 2021 07:30:37 +0000 (09:30 +0200)
commit93a1d4791c10d443bc67044def7efee2991d48b7
tree559745d13758ae4cddeff583813fe73c96ccdb5b
parentb64acb28da8394485f0762e657470c9fc33aca4d
mt76: dma: fix a possible memory leak in mt76_add_fragment()

Fix a memory leak in mt76_add_fragment routine returning the buffer
to the page_frag_cache when we receive a new fragment and the
skb_shared_info frag array is full.

Fixes: b102f0c522cf6 ("mt76: fix array overflow on receiving too many fragments for a packet")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/4f9dd73407da88b2a552517ce8db242d86bf4d5c.1611616130.git.lorenzo@kernel.org
drivers/net/wireless/mediatek/mt76/dma.c