[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6064f0ea917f5_868622089b@john-XPS-13-9370.notmuch>
Date: Wed, 31 Mar 2021 15:00:10 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>, netdev@...r.kernel.org
Cc: bpf@...r.kernel.org, duanxiongchun@...edance.com,
wangdongdong.6@...edance.com, jiang.wang@...edance.com,
Cong Wang <cong.wang@...edance.com>,
John Fastabend <john.fastabend@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Lorenz Bauer <lmb@...udflare.com>,
Jakub Sitnicki <jakub@...udflare.com>
Subject: RE: [Patch bpf-next v8 01/16] skmsg: lock ingress_skb when purging
Cong Wang wrote:
> From: Cong Wang <cong.wang@...edance.com>
>
> Currently we purge the ingress_skb queue only when psock
> refcnt goes down to 0, so locking the queue is not necessary,
> but in order to be called during ->close, we have to lock it
> here.
>
> Cc: John Fastabend <john.fastabend@...il.com>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Lorenz Bauer <lmb@...udflare.com>
> Acked-by: Jakub Sitnicki <jakub@...udflare.com>
> Signed-off-by: Cong Wang <cong.wang@...edance.com>
> ---
> net/core/skmsg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/skmsg.c b/net/core/skmsg.c
> index 07f54015238a..bebf84ed4e30 100644
> --- a/net/core/skmsg.c
> +++ b/net/core/skmsg.c
> @@ -634,7 +634,7 @@ static void sk_psock_zap_ingress(struct sk_psock *psock)
> {
> struct sk_buff *skb;
>
> - while ((skb = __skb_dequeue(&psock->ingress_skb)) != NULL) {
> + while ((skb = skb_dequeue(&psock->ingress_skb)) != NULL) {
> skb_bpf_redirect_clear(skb);
> kfree_skb(skb);
> }
> --
> 2.25.1
>
Acked-by: John Fastabend <john.fastabend@...il.com>
Powered by blists - more mailing lists