[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdf7db1a44ab0ee46fc621329ef9bc61734a723a.camel@redhat.com>
Date: Mon, 28 Aug 2023 12:17:06 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, syzbot
<syzkaller@...glegroups.com>
Subject: Re: [PATCH net-next] net: annotate data-races around sock->ops
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
Powered by blists - more mailing lists