[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWGyJcx2o=HUWoyB+E-7Z1y9LEwb362TTLGxrwuz9yULg@mail.gmail.com>
Date: Tue, 27 Jul 2021 20:06:45 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Cong Wang <cong.wang@...edance.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jakub Sitnicki <jakub@...udflare.com>,
Lorenz Bauer <lmb@...udflare.com>
Subject: Re: [Patch bpf-next] unix_bpf: fix a potential deadlock in unix_dgram_bpf_recvmsg()
On Tue, Jul 27, 2021 at 9:12 AM John Fastabend <john.fastabend@...il.com> wrote:
>
> Is there a reason to grab the mutex_lock(u->iolock) above the
> skb_queue_emptyaand sk_psock_queue_empty checks?
>
> Could it be move here just above the msg_bytes_ready label?
The check of the receive queue is more accurate with lock.
Thanks.
Powered by blists - more mailing lists