Re: [PATCH] nfc: s3fwrn5: allocate rx skb before consuming bytes

From: patchwork-bot+netdevbpf

Date: Fri Apr 03 2026 - 19:10:54 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Thu, 2 Apr 2026 12:21:48 +0800 you wrote:
> s3fwrn82_uart_read() reports the number of accepted bytes to the serdev
> core. The current code consumes bytes into recv_skb and may already
> deliver a complete frame before allocating a fresh receive buffer.
>
> If that alloc_skb() fails, the callback returns 0 even though it has
> already consumed bytes, and it leaves recv_skb as NULL for the next
> receive callback. That breaks the receive_buf() accounting contract and
> can also lead to a NULL dereference on the next skb_put_u8().
>
> [...]

Here is the summary with links:
- nfc: s3fwrn5: allocate rx skb before consuming bytes
https://git.kernel.org/netdev/net/c/5c14a19d5b16

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html