Re: [PATCH net v2] nfc: pn533: allocate rx skb before consuming bytes

From: patchwork-bot+netdevbpf

Date: Thu Apr 09 2026 - 08:08:28 EST


Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:

On Sun, 5 Apr 2026 08:40:00 +0800 you wrote:
> pn532_receive_buf() reports the number of accepted bytes to the serdev
> core. The current code consumes bytes into recv_skb and may already hand
> a complete frame to pn533_recv_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:
- [net,v2] nfc: pn533: allocate rx skb before consuming bytes
https://git.kernel.org/netdev/net/c/c71ba669b570

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