]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtlwifi: fix possible skb memory leak in `_rtl_pci_rx_interrupt()`.
authorThomas Fourier <fourier.thomas@gmail.com>
Mon, 16 Jun 2025 10:56:30 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:22 +0000 (16:28 +0200)
commitafb39537d89409ee8629bc0e3dbc699c8872a7fa
treee2fb9a89a3caa0fd561173ff063cdd411daa112e
parentc387d8fcd330af02724a079cd8f05509233671cd
wifi: rtlwifi: fix possible skb memory leak in `_rtl_pci_rx_interrupt()`.

[ Upstream commit 44c0e191004f0e3aa1bdee3be248be14dbe5b020 ]

The function `_rtl_pci_init_one_rxdesc()` can fail even when the new
`skb` is passed because of a DMA mapping error.  If it fails, the `skb`
is not saved in the rx ringbuffer and thus lost.

Compile tested only

Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250616105631.444309-4-fourier.thomas@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtlwifi/pci.c