All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	John Kacur <jkacur@redhat.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	stable@vger.kernel.org
Subject: [PATCH RT 2/5] net: free the sbs in skbufhead
Date: Thu, 09 Feb 2017 10:21:17 -0500	[thread overview]
Message-ID: <20170209152229.256090654@goodmis.org> (raw)
In-Reply-To: 20170209152115.146963512@goodmis.org

[-- Attachment #1: 0002-net-free-the-sbs-in-skbufhead.patch --]
[-- Type: text/plain, Size: 1215 bytes --]

4.4.47-rt59-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

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>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 net/core/dev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index a48dbd37dd43..e31ece38d1ec 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4951,13 +4951,21 @@ static void net_rx_action(struct softirq_action *h)
 	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;
 
-- 
2.10.2

  parent reply	other threads:[~2017-02-09 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 15:21 [PATCH RT 0/5] Linux 4.4.47-rt59-rc1 Steven Rostedt
2017-02-09 15:21 ` [PATCH RT 1/5] arm: kprobe: replace patch_lock to raw lock Steven Rostedt
2017-02-09 15:21 ` Steven Rostedt [this message]
2017-02-09 15:21 ` [PATCH RT 3/5] net: Have __napi_schedule_irqoff() disable interrupts on RT Steven Rostedt
2017-02-09 15:21 ` [PATCH RT 4/5] workqueue: use rcu_readlock() in put_pwq_unlocked() Steven Rostedt
2017-02-09 15:21 ` [PATCH RT 5/5] Linux 4.4.47-rt59-rc1 Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2017-02-09 15:32 [PATCH RT 0/5] Linux 4.1.38-rt45-rc1 Steven Rostedt
2017-02-09 15:32 ` [PATCH RT 2/5] net: free the sbs in skbufhead Steven Rostedt

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=20170209152229.256090654@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.