[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2020 12:57:46 -0700
From: Alexei Starovoitov <ast@...com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>,
Yonghong Song <yhs@...com>
CC: Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
Martin KaFai Lau <kafai@...com>,
Networking <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next v2 05/20] bpf: implement bpf_seq_read() for bpf
iterator
On 5/5/20 12:56 PM, Andrii Nakryiko wrote:
>> + seq->buf = kmalloc(seq->size, GFP_KERNEL);
>> + if (!seq->buf)
>> + goto Enomem;
> Why not just mutex_unlock and exit with -ENOMEM? Less goto'ing, more
> straightforward.
>
no. please keep kernel coding style. goto is appropriate here.
Powered by blists - more mailing lists