All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, Robin Holt <holt@sgi.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] sgi-xp: fix a use after free
Date: Sun, 19 Jun 2011 21:44:56 -0500	[thread overview]
Message-ID: <20110620024455.GF3525@sgi.com> (raw)
In-Reply-To: <1308523956.3539.105.camel@edumazet-laptop>

Thank you Eric.

David, if you want me to submit this through Andrew Morton, I can do
that instead.


Acked-by: Robin Holt <holt@sgi.com>


On Mon, Jun 20, 2011 at 12:52:36AM +0200, Eric Dumazet wrote:
> Its illegal to dereference skb after dev_kfree_skb(skb)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Robin Holt <holt@sgi.com>
> ---
> David, I am not sure Robin is active these days, maybe you can take this
> patch, since its clearly network related ?
> 
>  drivers/misc/sgi-xp/xpnet.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
> index ee5109a..42f0673 100644
> --- a/drivers/misc/sgi-xp/xpnet.c
> +++ b/drivers/misc/sgi-xp/xpnet.c
> @@ -495,14 +495,14 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  		}
>  	}
>  
> +	dev->stats.tx_packets++;
> +	dev->stats.tx_bytes += skb->len;
> +
>  	if (atomic_dec_return(&queued_msg->use_count) == 0) {
>  		dev_kfree_skb(skb);
>  		kfree(queued_msg);
>  	}
>  
> -	dev->stats.tx_packets++;
> -	dev->stats.tx_bytes += skb->len;
> -
>  	return NETDEV_TX_OK;
>  }
>  
> 

  parent reply	other threads:[~2011-06-20  2:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 22:52 [PATCH] sgi-xp: fix a use after free Eric Dumazet
2011-06-19 23:34 ` David Miller
2011-06-20  2:44 ` Robin Holt [this message]
2011-06-20  3:19   ` 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=20110620024455.GF3525@sgi.com \
    --to=holt@sgi.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.