Thread (2 messages) flat view 2 messages, 2 authors, 2024-10-29

Re: [PATCH v2] bpf: fix filed access without lock

From: patchwork-bot+netdevbpf@kernel.org
Date: 2024-10-29 17:50:20
Also in: bpf, lkml

Hello:

This patch was applied to bpf/bpf.git (master)
by Martin KaFai Lau [off-list ref]:

On Mon, 28 Oct 2024 14:52:26 +0800 you wrote:
The tcp_bpf_recvmsg_parser() function, running in user context,
retrieves seq_copied from tcp_sk without holding the socket lock, and
stores it in a local variable seq. However, the softirq context can
modify tcp_sk->seq_copied concurrently, for example, n tcp_read_sock().

As a result, the seq value is stale when it is assigned back to
tcp_sk->copied_seq at the end of tcp_bpf_recvmsg_parser(), leading to
incorrect behavior.

[...]
Here is the summary with links:
  - [v2] bpf: fix filed access without lock
    https://git.kernel.org/bpf/bpf/c/2ce9abd6e1e1

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help