From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964806AbcGGInu (ORCPT ); Thu, 7 Jul 2016 04:43:50 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39200 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbcGGIns (ORCPT ); Thu, 7 Jul 2016 04:43:48 -0400 Date: Thu, 7 Jul 2016 01:43:04 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: tglx@linutronix.de, arjan@infradead.org, edumazet@google.com, lenb@kernel.org, peterz@infradead.org, mingo@kernel.org, riel@redhat.com, torvalds@linux-foundation.org, linux@sciencehorizons.net, clm@fb.com, josh@joshtriplett.org, paulmck@linux.vnet.ibm.com, fweisbec@gmail.com, linux-kernel@vger.kernel.org, hpa@zytor.com Reply-To: paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, clm@fb.com, linux-kernel@vger.kernel.org, fweisbec@gmail.com, hpa@zytor.com, edumazet@google.com, peterz@infradead.org, lenb@kernel.org, arjan@infradead.org, tglx@linutronix.de, linux@sciencehorizons.net, torvalds@linux-foundation.org, riel@redhat.com, mingo@kernel.org In-Reply-To: <20160704094341.617891430@linutronix.de> References: <20160704094341.617891430@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] timers, net/ipv4/inet: Initialize connection request timers as pinned Git-Commit-ID: f3438bc7813c439a06104ba074301c8bdd64ac8b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f3438bc7813c439a06104ba074301c8bdd64ac8b Gitweb: http://git.kernel.org/tip/f3438bc7813c439a06104ba074301c8bdd64ac8b Author: Thomas Gleixner AuthorDate: Mon, 4 Jul 2016 09:50:23 +0000 Committer: Ingo Molnar CommitDate: Thu, 7 Jul 2016 10:35:06 +0200 timers, net/ipv4/inet: Initialize connection request timers as pinned Pinned timers must carry the pinned attribute in the timer structure itself, so convert the code to the new API. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Cc: Arjan van de Ven Cc: Chris Mason Cc: Eric Dumazet Cc: George Spelvin Cc: Josh Triplett Cc: Len Brown Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160704094341.617891430@linutronix.de Signed-off-by: Ingo Molnar --- net/ipv4/inet_connection_sock.c | 7 ++++--- net/ipv4/inet_timewait_sock.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index fa8c398..61a9dee 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -603,7 +603,7 @@ static void reqsk_timer_handler(unsigned long data) if (req->num_timeout++ == 0) atomic_dec(&queue->young); timeo = min(TCP_TIMEOUT_INIT << req->num_timeout, TCP_RTO_MAX); - mod_timer_pinned(&req->rsk_timer, jiffies + timeo); + mod_timer(&req->rsk_timer, jiffies + timeo); return; } drop: @@ -617,8 +617,9 @@ static void reqsk_queue_hash_req(struct request_sock *req, req->num_timeout = 0; req->sk = NULL; - setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req); - mod_timer_pinned(&req->rsk_timer, jiffies + timeout); + setup_pinned_timer(&req->rsk_timer, reqsk_timer_handler, + (unsigned long)req); + mod_timer(&req->rsk_timer, jiffies + timeout); inet_ehash_insert(req_to_sk(req), NULL); /* before letting lookups find us, make sure all req fields diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 2065816..ddcd56c 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -188,7 +188,8 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, tw->tw_prot = sk->sk_prot_creator; atomic64_set(&tw->tw_cookie, atomic64_read(&sk->sk_cookie)); twsk_net_set(tw, sock_net(sk)); - setup_timer(&tw->tw_timer, tw_timer_handler, (unsigned long)tw); + setup_pinned_timer(&tw->tw_timer, tw_timer_handler, + (unsigned long)tw); /* * Because we use RCU lookups, we should not set tw_refcnt * to a non null value before everything is setup for this @@ -248,7 +249,7 @@ void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo, bool rearm) tw->tw_kill = timeo <= 4*HZ; if (!rearm) { - BUG_ON(mod_timer_pinned(&tw->tw_timer, jiffies + timeo)); + BUG_ON(mod_timer(&tw->tw_timer, jiffies + timeo)); atomic_inc(&tw->tw_dr->tw_count); } else { mod_timer_pending(&tw->tw_timer, jiffies + timeo);