Re: [PATCH bpf-next v2 3/8] bpf, iter: Fix the condition on p when calling stop.

Yonghong Song
2022-06-24T17:46:17Z

On 6/21/22 12:25 AM, Hao Luo wrote:
> On Mon, Jun 20, 2022 at 11:48 AM Yonghong Song <yhs-b10kYP2dOMg@public.gmane.org> wrote:
>>
>> On 6/10/22 12:44 PM, Yosry Ahmed wrote:
>>> From: Hao Luo <haoluo-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>>
>>> In bpf_seq_read, seq->op->next() could return an ERR and jump to
>>> the label stop. However, the existing code in stop does not handle
>>> the case when p (returned from next()) is an ERR. Adds the handling
>>> of ERR of p by converting p into an error and jumping to done.
>>>
>>> Because all the current implementations do not have a case that
>>> returns ERR from next(), so this patch doesn't have behavior changes
>>> right now.
>>>
>>> Signed-off-by: Hao Luo <haoluo-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>
>> Acked-by: Yonghong Song <yhs-b10kYP2dOMg@public.gmane.org>
>
> Yonghong, do you want to get this change in now, or you want to wait
> for the whole patchset? This fix is straightforward and independent of
> other parts. Yosry and I can rebase.

Sorry for delay. Let me review other patches as well before your next
version.

BTW, I would be great if you just put the prerequisite patch

https://lore.kernel.org/bpf/20220421140740.459558-5-benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org/
as the first patch so at least BPF CI will be able to test
your patch set. It looks like KP's bpf_getxattr patch set already did this.