lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2 net] net: fec: Coverity issue: Dereference null return value
Date

> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: 2022年12月21日 3:36
> To: Wei Fang <wei.fang@nxp.com>
> Cc: davem@davemloft.net; edumazet@google.com; pabeni@redhat.com;
> Clark Wang <xiaoning.wang@nxp.com>; Shenwei Wang
> <shenwei.wang@nxp.com>; alexander.duyck@gmail.com; dl-linux-imx
> <linux-imx@nxp.com>; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net] net: fec: Coverity issue: Dereference null return
> value
>
> On Mon, 19 Dec 2022 10:27:55 +0800 wei.fang@nxp.com wrote:
> > From: Wei Fang <wei.fang@nxp.com>
> >
> > The build_skb might return a null pointer but there is no check on the
> > return value in the fec_enet_rx_queue(). So a null pointer dereference
> > might occur. To avoid this, we check the return value of build_skb. If
> > the return value is a null pointer, the driver will recycle the page
> > and update the statistic of ndev. Then jump to rx_processing_done to
> > clear the status flags of the BD so that the hardware can recycle the BD.
>
> Applied but I had to change the subject because the subject should describe
> the change. Mentioning the tool which found the problem belongs in the body
> of the message.

Thanks for taking the time to make these changes, I'll keep these things in mind
next time.
\
 
 \ /
  Last update: 2023-03-26 23:16    [W:0.082 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site