From patchwork Mon Jun 3 09:36:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 13683499 X-Patchwork-Delegate: kuba@kernel.org Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5CA584D3C for ; Mon, 3 Jun 2024 09:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407451; cv=none; b=k0MU8St9bHjtsCIEDx21DFxPY6DfzT/bxUVX8thpK6JaVm7ZaEKgoe1rxlUE/bYgnggOCqpGSlhCqIAMu8pppBVlK5WMlKccGn76KFa+6H6bCWJz0c23O3uSRRVImjUkWI8njBhe3YCgptXc9OE3IzXHWMGZYDu3QI/yWHxCZNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407451; c=relaxed/simple; bh=gsmyQIjO+w7dxCugBlO3h+RZ/0LlWj06uqNxID2B+vo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HVmDkkpNxjG8jkxu6PYKOR1pDUfistWyf66eM61eRdHOoNpMsVhbvElBWOW84s763J7c4uk4v3U3G89YCDHgyn6PVpfk+oo6tHrGk+wa99rFVmJr5dcKPIhafZ4cmvXns0HU7ASJU9g0tJdWBjRfAIQ/Ho7O9l3DEW/4EdxGA6g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=breakpoint.cc Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1sE488-00012y-As; Mon, 03 Jun 2024 11:37:28 +0200 From: Florian Westphal To: Cc: Paolo Abeni , "David S. Miller" , Eric Dumazet , Jakub Kicinski , mleitner@redhat.com, juri.lelli@redhat.com, vschneid@redhat.com, tglozar@redhat.com, dsahern@kernel.org, bigeasy@linutronix.de, tglx@linutronix.de Subject: [PATCH net-next v6 2/3] net: tcp: un-pin the tw_timer Date: Mon, 3 Jun 2024 11:36:11 +0200 Message-ID: <20240603093625.4055-3-fw@strlen.de> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240603093625.4055-1-fw@strlen.de> References: <20240603093625.4055-1-fw@strlen.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org After previous patch, even if timer fires immediately on another CPU, context that schedules the timer now holds the ehash spinlock, so timer cannot reap tw socket until ehash lock is released. Signed-off-by: Florian Westphal --- net/ipv4/inet_timewait_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 2b1d836df64e..66d9b76595b7 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -213,7 +213,7 @@ 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)); - timer_setup(&tw->tw_timer, tw_timer_handler, TIMER_PINNED); + timer_setup(&tw->tw_timer, tw_timer_handler, 0); /* * Because we use RCU lookups, we should not set tw_refcnt * to a non null value before everything is setup for this