linux-rt-users.vger.kernel.org archive mirror
 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>, <stable-rt@vger.kernel.org>,
	Mike Galbraith <bitbucket@online.de>,
	Eric Dumazet <edumazet@google.com>
Subject: [PATCH RT 1/4] tcp: force a dst refcount when prequeue packet
Date: Fri, 03 May 2013 21:02:08 -0400	[thread overview]
Message-ID: <20130504010229.679940374@goodmis.org> (raw)
In-Reply-To: 20130504010207.365885836@goodmis.org

[-- Attachment #1: 0001-tcp-force-a-dst-refcount-when-prequeue-packet.patch --]
[-- Type: text/plain, Size: 901 bytes --]

From: Eric Dumazet <edumazet@google.com>

Before escaping RCU protected section and adding packet into
prequeue, make sure the dst is refcounted.

Cc: stable-rt@vger.kernel.org
Reported-by: Mike Galbraith <bitbucket@online.de>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/net/tcp.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index b28a49f..4881cb6 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -902,6 +902,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
 	if (sysctl_tcp_low_latency || !tp->ucopy.task)
 		return 0;
 
+	skb_dst_force(skb);
 	__skb_queue_tail(&tp->ucopy.prequeue, skb);
 	tp->ucopy.memory += skb->truesize;
 	if (tp->ucopy.memory > sk->sk_rcvbuf) {
-- 
1.7.10.4

  reply	other threads:[~2013-05-04  1:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04  1:02 [PATCH RT 0/4] [ANNOUNCE] 3.0.75-rt103-rc1 Steven Rostedt
2013-05-04  1:02 ` Steven Rostedt [this message]
2013-05-04  1:02 ` [PATCH RT 2/4] x86/mce: Defer mce wakeups to threads for PREEMPT_RT Steven Rostedt
2013-05-04  1:02 ` [PATCH RT 3/4] swap: Use unique local lock name for swap_lock Steven Rostedt
2013-05-04  1:02 ` [PATCH RT 4/4] Linux 3.0.75-rt103-rc1 Steven Rostedt
2013-05-04 19:57 ` Unsubscribing Damien Moody
2013-05-04 20:35   ` Unsubscribing Mark Knecht
  -- strict thread matches above, loose matches on Subject: below --
2013-05-03 21:58 [PATCH RT 0/4] [ANNOUNCE] 3.4.42-rt57-rc1 Steven Rostedt
2013-05-03 21:58 ` [PATCH RT 1/4] tcp: force a dst refcount when prequeue packet 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=20130504010229.679940374@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=bitbucket@online.de \
    --cc=edumazet@google.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=stable-rt@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 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).