Skip to content

Commit

Permalink
qdisc: exit case fixes for skb list handling in qdisc layer
Browse files Browse the repository at this point in the history
More minor fixes to merge commit 53fda7f (Merge branch 'xmit_list')
that allows us to work with a list of SKBs.

Fixing exit cases in qdisc_reset() and qdisc_destroy(), where a
leftover requeued SKB (qdisc->gso_skb) can have the potential of
being a skb list, thus use kfree_skb_list().

This is a followup to commit 10770bc ("qdisc: adjustments for
API allowing skb list xmits").

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jesper Dangaard Brouer authored and David S. Miller committed Sep 4, 2014
1 parent 10770bc commit 3f3c7ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ void qdisc_reset(struct Qdisc *qdisc)
ops->reset(qdisc);

if (qdisc->gso_skb) {
kfree_skb(qdisc->gso_skb);
kfree_skb_list(qdisc->gso_skb);
qdisc->gso_skb = NULL;
qdisc->q.qlen = 0;
}
Expand Down Expand Up @@ -657,7 +657,7 @@ void qdisc_destroy(struct Qdisc *qdisc)
module_put(ops->owner);
dev_put(qdisc_dev(qdisc));

kfree_skb(qdisc->gso_skb);
kfree_skb_list(qdisc->gso_skb);
/*
* gen_estimator est_timer() might access qdisc->q.lock,
* wait a RCU grace period before freeing qdisc.
Expand Down

0 comments on commit 3f3c7ee

Please sign in to comment.