[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJCcQp89Z_JxDevCh7RwtTCZFop85O1Tv3mFJKBK0TxXw@mail.gmail.com>
Date: Wed, 10 May 2023 13:32:50 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
syzbot <syzkaller@...glegroups.com>, Rainer Weikusat <rweikusat@...gmbh.com>
Subject: Re: [PATCH v1 net 2/2] af_unix: Fix data races around sk->sk_shutdown.
On Wed, May 10, 2023 at 2:36 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> KCSAN found a data race around sk->sk_shutdown where unix_release_sock()
> and unix_shutdown() update it under unix_state_lock(), OTOH unix_poll()
> and unix_dgram_poll() read it locklessly.
>
> We need to annotate the writes and reads with WRITE_ONCE() and READ_ONCE().
>
> Fixes: 3c73419c09a5 ("af_unix: fix 'poll for write'/ connected DGRAM sockets")
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reported-by: syzbot <syzkaller@...glegroups.com>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists