[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170826010556.rxoyckykv6bwg47o@ast-mbp>
Date: Fri, 25 Aug 2017 18:05:58 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next] bpf: fix oops on allocation failure
On Fri, Aug 25, 2017 at 11:27:14PM +0300, Dan Carpenter wrote:
> "err" is set to zero if bpf_map_area_alloc() fails so it means we return
> ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not
> expecting NULL returns and will oops.
>
> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
good catch. Thanks!
Acked-by: Alexei Starovoitov <ast@...nel.org>
Powered by blists - more mailing lists