mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
net: annotate sk->sk_err write from do_recvmmsg()
[ Upstream commite05a5f510f
] do_recvmmsg() can write to sk->sk_err from multiple threads. As said before, many other points reading or writing sk_err need annotations. Fixes:34b88a68f2
("net: Fix use after free in the recvmmsg exit path") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: syzbot <syzkaller@googlegroups.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c1c7a77c43
commit
85a1a7fe73
1 changed files with 1 additions and 1 deletions
|
@ -2820,7 +2820,7 @@ static int do_recvmmsg(int fd, struct mmsghdr __user *mmsg,
|
||||||
* error to return on the next call or if the
|
* error to return on the next call or if the
|
||||||
* app asks about it using getsockopt(SO_ERROR).
|
* app asks about it using getsockopt(SO_ERROR).
|
||||||
*/
|
*/
|
||||||
sock->sk->sk_err = -err;
|
WRITE_ONCE(sock->sk->sk_err, -err);
|
||||||
}
|
}
|
||||||
out_put:
|
out_put:
|
||||||
fput_light(sock->file, fput_needed);
|
fput_light(sock->file, fput_needed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue