[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVEHF2h58YJA7xdWifSG0dtErhkoe4rjceTR7w_1SMspA@mail.gmail.com>
Date: Mon, 19 Jul 2021 17:03:15 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, Cong Wang <cong.wang@...edance.com>,
John Fastabend <john.fastabend@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jakub Sitnicki <jakub@...udflare.com>,
Lorenz Bauer <lmb@...udflare.com>
Subject: Re: [PATCH bpf-next v5 07/11] af_unix: implement unix_dgram_bpf_recvmsg()
On Sun, Jul 18, 2021 at 10:49 AM Eric Dumazet <eric.dumazet@...il.com> wrote:
>
>
>
> On 7/4/21 9:02 PM, Cong Wang wrote:
> > From: Cong Wang <cong.wang@...edance.com>
> > + mutex_lock(&u->iolock);
>
> u->iolock mutex is owned here.
>
> > + if (!skb_queue_empty(&sk->sk_receive_queue) &&
> > + sk_psock_queue_empty(psock)) {
> > + ret = __unix_dgram_recvmsg(sk, msg, len, flags);
>
> But __unix_dgram_recvmsg() will also try to grab this mutex ?
Good catch. I should release the lock before calling it. I will send
a patch.
Thanks.
Powered by blists - more mailing lists