[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3yanROxeZDR+aNG@unreal>
Date: Tue, 22 Nov 2022 11:47:09 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Zhang Changzhong <zhangchangzhong@...wei.com>,
Edward Cree <ecree.xilinx@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] sfc: fix potential memleak in
__ef100_hard_start_xmit()
On Tue, Nov 22, 2022 at 09:28:42AM +0100, Paolo Abeni wrote:
> Hello,
>
> On Fri, 2022-11-18 at 19:11 +0200, Leon Romanovsky wrote:
> > On Fri, Nov 18, 2022 at 09:15:43AM +0000, Martin Habets wrote:
> > > On Thu, Nov 17, 2022 at 03:05:27PM +0200, Leon Romanovsky wrote:
> > > > Please take a look __ef100_enqueue_skb() and see if it frees SKB on
> > > > error or not. If not, please fix it.
> > >
> > > That function looks ok to me, but I appreciate the extra eyes on it.
> >
> > __ef100_enqueue_skb() has the following check in error path:
> >
> > 498 err:
> > 499 efx_enqueue_unwind(tx_queue, old_insert_count);
> > 500 if (!IS_ERR_OR_NULL(skb))
> > 501 dev_kfree_skb_any(skb);
> > 502
> >
> > The issue is that skb is never error or null here and this "if" is
> > actually always true and can be deleted.
>
> I think that such additional change could be suite for a different net-
> next patch, while this -net patch could land as is, @Leon: do you
> agree?
>
Sure, thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists