[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4421c143-0295-8e82-1ccf-f2acfadb2a3b@linux.dev>
Date: Mon, 31 Jul 2023 18:22:49 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Xu Kuohai <xukuohai@...weicloud.com>,
John Fastabend <john.fastabend@...il.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
Jakub Sitnicki <jakub@...udflare.com>, "David S . Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf] bpf, sockmap: Fix bug that strp_done cannot be called
On 7/28/23 3:57 AM, Xu Kuohai wrote:
> strp_done is only called when psock->progs.stream_parser is not NULL,
> but stream_parser was set to NULL by sk_psock_stop_strp(), called
> by sk_psock_drop() earlier. So, strp_done can never be called.
>
> Introduce SK_PSOCK_RX_ENABLED to mark whether there is strp on psock.
> Change the condition for calling strp_done from judging whether
> stream_parser is set to judging whether this flag is set. This flag is
> only set once when strp_init() succeeds, and will never be cleared later.
John, please help to review.
Powered by blists - more mailing lists