[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3QZVXCOSjBd4l9P@electric-eye.fr.zoreil.com>
Date: Tue, 15 Nov 2022 23:57:25 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: Zhang Changzhong <zhangchangzhong@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, mdf@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2 1/3] net: nixge: fix potential memory leak in
nixge_start_xmit()
Zhang Changzhong <zhangchangzhong@...wei.com> :
> The nixge_start_xmit() returns NETDEV_TX_OK but does not free skb in
> case of dma_map_single() fails, which leads to memory leak.
>
> Fix it by adding dev_kfree_skb_any() when dma_map_single() fails.
>
> Fixes: 492caffa8a1a ("net: ethernet: nixge: Add support for National Instruments XGE netdev")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
> ---
> drivers/net/ethernet/ni/nixge.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Francois Romieu <romieu@...zoreil.com>
--
Ueimor
Powered by blists - more mailing lists