Thread (6 messages) flat view 6 messages, 4 authors, 2023-08-28

Re: [PATCH net-next] net: annotate data-races around sock->ops

From: Paolo Abeni <pabeni@redhat.com>
Date: 2023-08-28 10:17:23

Hi,

On Tue, 2023-08-08 at 13:58 +0000, Eric Dumazet wrote:
IPV6_ADDRFORM socket option is evil, because it can change sock->ops
while other threads might read it. Same issue for sk->sk_family
being set to AF_INET.

Adding READ_ONCE() over sock->ops reads is needed for sockets
that might be impacted by IPV6_ADDRFORM.

Note that mptcp_is_tcpsk() can also overwrite sock->ops.

Adding annotations for all sk->sk_family reads will require
more patches :/
I was unable to give the above a proper look before due to OoO on my
side.

The mptcp code calls mptcp_is_tcpsk() only before the fd for the newly
accepted socket is installed, so we should not have concurrent racing
access to sock->ops?!? Do you have any related splat handy?

Thanks,

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