]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: annotate races around tp->urg_data
authorEric Dumazet <edumazet@google.com>
Mon, 15 Nov 2021 19:02:43 +0000 (11:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Nov 2021 13:10:34 +0000 (13:10 +0000)
commite8e14f9045bdc42413b29ed10078a8034f9f47a6
treeb4b56acb67359121477091e1512aacb6016a570a
parent6f4fba504116c4e7dd5e3b0f60a3bc297290ea35
tcp: annotate races around tp->urg_data

tcp_poll() and tcp_ioctl() are reading tp->urg_data without socket lock
owned.

Also, it is faster to first check tp->urg_data in tcp_poll(),
then tp->urg_seq == tp->copied_seq, because tp->urg_seq is
located in a different/cold cache line.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c
net/ipv4/tcp_input.c