All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Gorm Hansen <jacob@melon.dk>
To: Xen list <xen-devel@lists.sourceforge.net>
Subject: Resetting network device / skb leak
Date: Wed, 21 Apr 2004 19:38:47 +0200	[thread overview]
Message-ID: <1082569127.902.22.camel@paleface> (raw)

hi,

I seem to have a problem with the Linux xen-network driver leaking skbs.
This is probably my own fault, upon resumption after migration I call
this:

void network_resume(void)
{
    struct net_device* dev = __dev_get_by_name("eth0");
    MOD_DEC_USE_COUNT;

    network_open(dev);
}

-- which works fine. However, in network_open() the call to
NETOP_RESET_RINGS seems to clear all the pointers to the old skbs, and
network_alloc_rx_buffers() allocs a bunch of new ones. It suppose that
means I have just leaked a whole bunch of skbs. I know the standard
suspend/resume code performs almost a full ifup/ifdown (which I cannot
do in my case) but I don't see any skb-freeing code in that case either?

I have tried dev_kfree_skb()'ing the contents of the np->rx_skbs[1:]
array before calling network_open, but doing so just crashes Linux :-(

Any ideas?

Jacob



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

             reply	other threads:[~2004-04-21 17:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-21 17:38 Jacob Gorm Hansen [this message]
2004-04-22  6:19 ` Resetting network device / skb leak Keir Fraser
2004-04-22 10:23   ` Jacob Gorm Hansen
2004-04-22 10:28     ` Keir Fraser
2004-04-22 10:46       ` Jacob Gorm Hansen

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=1082569127.902.22.camel@paleface \
    --to=jacob@melon.dk \
    --cc=xen-devel@lists.sourceforge.net \
    /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.