[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+06vspuPjuJ76s1QZbTe1-JUe4coPixP6eVDv1j3xtjw@mail.gmail.com>
Date: Sat, 2 Sep 2023 08:41:17 +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,
syzkaller <syzkaller@...glegroups.com>, Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [PATCH v1 net 2/4] af_unix: Fix data-race around unix_tot_inflight.
On Sat, Sep 2, 2023 at 2:28 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> unix_tot_inflight is changed under spin_lock(unix_gc_lock), but
> unix_release_sock() reads it locklessly.
>
> Let's use READ_ONCE() for unix_tot_inflight.
>
> Note that the writer side was marked by commit 9d6d7f1cb67c ("af_unix:
> annote lockless accesses to unix_tot_inflight & gc_in_progress")
>
>
> Fixes: 9305cfa4443d ("[AF_UNIX]: Make unix_tot_inflight counter non-atomic")
> Reported-by: syzkaller <syzkaller@...glegroups.com>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists