[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170918155706.dtqxrffmw3ttnztg@ast-mbp.dhcp.thefacebook.com>
Date: Mon, 18 Sep 2017 08:57:10 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Tobias Klauser <tklauser@...tanz.ch>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH] bpf: devmap: pass on return value of
bpf_map_precharge_memlock
On Mon, Sep 18, 2017 at 03:03:46PM +0200, Tobias Klauser wrote:
> If bpf_map_precharge_memlock in dev_map_alloc, -ENOMEM is returned
> regardless of the actual error produced by bpf_map_precharge_memlock.
> Fix it by passing on the error returned by bpf_map_precharge_memlock.
>
> Also return -EINVAL instead of -ENOMEM if the page count overflow check
> fails.
>
> This makes dev_map_alloc match the behavior of other bpf maps' alloc
> functions wrt. return values.
>
> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
good catch.
Acked-by: Alexei Starovoitov <ast@...nel.org>
Powered by blists - more mailing lists