[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1447883629.22599.183.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 18 Nov 2015 13:53:49 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <shemming@...cade.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] fm10k: fix memory leak
On Tue, 2015-11-17 at 14:24 -0800, Stephen Hemminger wrote:
> This was detected by Coverity.
> The function skb_cow_head leaves skb alone on failure, so caller needs
> to free.
>
> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
>
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c 2015-11-17 13:33:40.032694657 -0800
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c 2015-11-17 14:13:03.086942495 -0800
> @@ -627,8 +627,10 @@ static netdev_tx_t fm10k_xmit_frame(stru
>
> /* verify the skb head is not shared */
> err = skb_cow_head(skb, 0);
> - if (err)
> + if (err) {
> + dev_kfree_skb(skb);
> return NETDEV_TX_OK;
> + }
>
> /* locate vlan header */
>
kfree_skb() to be drop monitor friendly ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists