Skip to content
Commit 1328f39a authored by linke li's avatar linke li Committed by Zhengchao Shao
Browse files

net: mark racy access on sk->sk_rcvbuf

stable inclusion
from stable-v4.19.314
commit 9e7538cb8131946817218f793ceb334c63cfcdb8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IA7IEQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9e7538cb8131946817218f793ceb334c63cfcdb8



--------------------------------

[ Upstream commit c2deb2e971f5d9aca941ef13ee05566979e337a4 ]

sk->sk_rcvbuf in __sock_queue_rcv_skb() and __sk_receive_skb() can be
changed by other threads. Mark this as benign using READ_ONCE().

This patch is aimed at reducing the number of benign races reported by
KCSAN in order to focus future debugging effort on harmful races.

Signed-off-by: default avatarlinke li <lilinke99@qq.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 919baa6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment