netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David L Stevens <david.stevens@oracle.com>
To: roy.qing.li@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] sunvnet: fix a memory leak in vnet_handle_offloads
Date: Fri, 19 Dec 2014 12:39:43 -0500	[thread overview]
Message-ID: <549462DF.7050709@oracle.com> (raw)
In-Reply-To: <1418966375-23188-1-git-send-email-roy.qing.li@gmail.com>


Acked-by: David L Stevens <david.stevens@oracle.com>

On 12/19/2014 12:19 AM, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
> 
> when skb_gso_segment returns error, the original skb should be freed
> 
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
> ---
>  drivers/net/ethernet/sun/sunvnet.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
> index 45c408e..d2835bf 100644
> --- a/drivers/net/ethernet/sun/sunvnet.c
> +++ b/drivers/net/ethernet/sun/sunvnet.c
> @@ -1201,6 +1201,7 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb)
>  		segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO);
>  	if (IS_ERR(segs)) {
>  		dev->stats.tx_dropped++;
> +		dev_kfree_skb_any(skb);
>  		return NETDEV_TX_OK;
>  	}
>  
> 

  reply	other threads:[~2014-12-19 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19  5:19 [PATCH] sunvnet: fix a memory leak in vnet_handle_offloads roy.qing.li
2014-12-19 17:39 ` David L Stevens [this message]
2014-12-19 18:22 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=549462DF.7050709@oracle.com \
    --to=david.stevens@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=roy.qing.li@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).