* net: free the sbs in skbufhead
@ 2016-12-12 16:54 Sebastian Andrzej Siewior
0 siblings, 0 replies; only message in thread
From: Sebastian Andrzej Siewior @ 2016-12-12 16:54 UTC (permalink / raw)
To: linux-rt-users; +Cc: linux-kernel, tglx, Steven Rostedt
In "skbufhead-raw-lock.patch" we moved the memory to a list and the hunk that
cleared the list got misplaced.
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
net/core/dev.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5201,13 +5201,21 @@ static void net_rx_action(struct softirq
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
unsigned long time_limit = jiffies + 2;
int budget = netdev_budget;
+ struct sk_buff_head tofree_q;
+ struct sk_buff *skb;
LIST_HEAD(list);
LIST_HEAD(repoll);
+ __skb_queue_head_init(&tofree_q);
+
local_irq_disable();
+ skb_queue_splice_init(&sd->tofree_queue, &tofree_q);
list_splice_init(&sd->poll_list, &list);
local_irq_enable();
+ while ((skb = __skb_dequeue(&tofree_q)))
+ kfree_skb(skb);
+
for (;;) {
struct napi_struct *n;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-12 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 16:54 net: free the sbs in skbufhead Sebastian Andrzej Siewior
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).