From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next] pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset()
Date: Mon, 3 Nov 2008 09:48:30 +0000 [thread overview]
Message-ID: <20081103094830.GA6030@ff.dom.local> (raw)
In-Reply-To: <20081103.012755.210488675.davem@davemloft.net>
On Mon, Nov 03, 2008 at 01:27:55AM -0800, David Miller wrote:
...
> Isn't it necessary, or at least more tidy, to NULL out
> this value too?
Sure it is!
Thanks!
Jarek P.
-----------------------> take 2
pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset()
Since gso_skb is re-used for qdisc_peek_dequeued(), and this skb is
counted in the qdisc->q.qlen, it has to be kfreed during qdisc_reset()
when qlen is zeroed.
With help from David S. Miller <davem@davemloft.net>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 318c9f6..1192da2 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -542,6 +542,9 @@ void qdisc_reset(struct Qdisc *qdisc)
if (ops->reset)
ops->reset(qdisc);
+
+ kfree_skb(qdisc->gso_skb);
+ qdisc->gso_skb = NULL;
}
EXPORT_SYMBOL(qdisc_reset);
next prev parent reply other threads:[~2008-11-03 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 9:02 [PATCH net-next] pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset() Jarek Poplawski
2008-11-03 9:27 ` David Miller
2008-11-03 9:48 ` Jarek Poplawski [this message]
2008-11-03 10:53 ` [PATCH v2 " 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=20081103094830.GA6030@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--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 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).