linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Jacek Konieczny <jajcus@jajcus.net>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: RT kernel on Acer laptop unreliable
Date: Mon, 21 Aug 2017 15:12:54 +0200	[thread overview]
Message-ID: <20170821131254.5nuacfv62d3l4rhe@linutronix.de> (raw)
In-Reply-To: <b1209f35-67a2-5cb2-d0e1-ad142b34aab9@jajcus.net>

On 2017-08-20 16:48:24 [+0200], Jacek Konieczny wrote:
> Does this help?

yup, the following patch should make it go away.

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 55c5f068d986..8bbb8f967614 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -713,8 +713,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
 
 	arg.tos = ip_hdr(skb)->tos;
 	arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL);
-	local_lock(tcp_sk_lock);
 	local_bh_disable();
+	local_lock(tcp_sk_lock);
 	ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
 			      skb, &TCP_SKB_CB(skb)->header.h4.opt,
 			      ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
@@ -722,8 +722,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
 
 	__TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
 	__TCP_INC_STATS(net, TCP_MIB_OUTRSTS);
-	local_bh_enable();
 	local_unlock(tcp_sk_lock);
+	local_bh_enable();
 
 #ifdef CONFIG_TCP_MD5SIG
 out:
@@ -801,16 +801,16 @@ static void tcp_v4_send_ack(const struct sock *sk,
 		arg.bound_dev_if = oif;
 	arg.tos = tos;
 	arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL);
-	local_lock(tcp_sk_lock);
 	local_bh_disable();
+	local_lock(tcp_sk_lock);
 	ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
 			      skb, &TCP_SKB_CB(skb)->header.h4.opt,
 			      ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
 			      &arg, arg.iov[0].iov_len);
 
 	__TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
-	local_bh_enable();
 	local_unlock(tcp_sk_lock);
+	local_bh_enable();
 }
 
 static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb)


> The system has not crashed yet, I may catch something more.

okay.

> Jacek

Sebastian

  reply	other threads:[~2017-08-21 13:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15 17:43 RT kernel on Acer laptop unreliable Jacek Konieczny
2017-07-17  6:21 ` Stéphane Ancelot
2017-07-17  6:31   ` Piotr Gregor
2017-07-17 15:06     ` Jacek Konieczny
2017-07-17 17:59       ` Piotr Gregor
2017-08-07 13:19 ` Sebastian Andrzej Siewior
2017-08-12 10:07   ` Jacek Konieczny
2017-08-14 18:03   ` Jacek Konieczny
2017-08-18 12:44     ` Sebastian Andrzej Siewior
2017-08-20 14:48       ` Jacek Konieczny
2017-08-21 13:12         ` Sebastian Andrzej Siewior [this message]
2017-08-23 17:04           ` Jacek Konieczny
2017-09-05  9:17             ` Sebastian Andrzej Siewior
2017-09-05 19:37               ` Jacek Konieczny
2017-09-10 12:49                 ` Jacek Konieczny
2017-09-11  7:17                   ` Sebastian Andrzej Siewior
2017-09-14 19:11                     ` Jacek Konieczny
2017-09-21 12:57                       ` Sebastian Andrzej Siewior
2017-09-22  7:40               ` Sebastian Andrzej Siewior

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=20170821131254.5nuacfv62d3l4rhe@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=jajcus@jajcus.net \
    --cc=linux-rt-users@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).