Bug 9301 - Annotate data-races around sk->sk_state in UNIX_DIAG
Summary: Annotate data-races around sk->sk_state in UNIX_DIAG
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: net (show other bugs) net
Version: 5.10.y-14
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: XuanZhuo
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-07 18:11 UTC by NoobSteven
Modified: 2024-06-07 20:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NoobSteven 2024-06-07 18:11:58 UTC
While dumping AF_UNIX sockets via UNIX_DIAG, sk->sk_state is read
locklessly.

Let's use READ_ONCE() there.

Note that the result could be inconsistent if the socket is dumped
during the state change.  This is common for other SOCK_DIAG and
similar interfaces.
Comment 1 小龙 admin 2024-06-07 20:43:12 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3327