Re: [PATCH RESEND net] net/smc: fix data error when recvmsg with MSG_PEEK flag
From: patchwork-bot+netdevbpf
Date: Mon Jan 13 2025 - 22:10:41 EST
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Sat, 4 Jan 2025 22:32:01 +0800 you wrote:
> When recvmsg with MSG_PEEK flag, the data will be copied to
> user's buffer without advancing consume cursor and without
> reducing the length of rx available data. Once the expected
> peek length is larger than the value of bytes_to_rcv, in the
> loop of do while in smc_rx_recvmsg, the first loop will copy
> bytes_to_rcv bytes of data from the position local_tx_ctrl.cons,
> the second loop will copy the min(bytes_to_rcv, read_remaining)
> bytes from the position local_tx_ctrl.cons again because of the
> lacking of process with advancing consume cursor and reducing
> the length of available data. So do the subsequent loops. The
> data copied in the second loop and the subsequent loops will
> result in data error, as it should not be copied if no more data
> arrives and it should be copied from the position advancing
> bytes_to_rcv bytes from the local_tx_ctrl.cons if more data arrives.
>
> [...]
Here is the summary with links:
- [RESEND,net] net/smc: fix data error when recvmsg with MSG_PEEK flag
https://git.kernel.org/netdev/net-next/c/a4b6539038c1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html