Re: [PATCH net] bpf/xskmap: Return ERR_PTR for failure case instead of NULL.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 24, 2019 at 09:30:44PM +0200, Björn Töpel wrote:
> On 2019-09-24 18:25, Jonathan Lemon wrote:
> > When kzalloc() failed, NULL was returned to the caller, which
> > tested the pointer with IS_ERR(), which didn't match, so the
> > pointer was used later, resulting in a NULL dereference.
> > 
> > Return ERR_PTR(-ENOMEM) instead of NULL.
> > 
> > Reported-by: syzbot+491c1b7565ba9069ecae@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Fixes: 0402acd683c6 ("xsk: remove AF_XDP socket from map when the socket is released")
> > Signed-off-by: Jonathan Lemon <jonathan.lemon@xxxxxxxxx>
> 
> Thanks Jonathan! You beat me to it! :-P
> 
> Acked-by: Björn Töpel <bjorn.topel@xxxxxxxxx>

Applied, thanks!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux