From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50DB7C43217 for ; Fri, 4 Nov 2022 05:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231354AbiKDF4C (ORCPT ); Fri, 4 Nov 2022 01:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbiKDFzW (ORCPT ); Fri, 4 Nov 2022 01:55:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 163B22A424; Thu, 3 Nov 2022 22:52:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B1CAAB82BFE; Fri, 4 Nov 2022 05:51:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F079C433D6; Fri, 4 Nov 2022 05:51:41 +0000 (UTC) Date: Fri, 4 Nov 2022 01:51:39 -0400 From: Steven Rostedt To: Eric Dumazet Cc: Paolo Abeni , Jakub Kicinski , Linus Torvalds , linux-kernel@vger.kernel.org, Thomas Gleixner , Stephen Boyd , Guenter Roeck , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Mirko Lindner , Stephen Hemminger , Martin KaFai Lau , Alexei Starovoitov , Kuniyuki Iwashima , Pavel Begunkov , Menglong Dong , linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, bridge@lists.linux-foundation.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, lvs-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net Subject: Re: [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown() before freeing timer Message-ID: <20221104015139.58f17730@rorschach.local.home> In-Reply-To: References: <20221027150525.753064657@goodmis.org> <20221027150928.780676863@goodmis.org> <20221027155513.60b211e2@gandalf.local.home> <20221027163453.383bbf8e@gandalf.local.home> <20221027170720.31497319@gandalf.local.home> <20221027183511.66b058c4@gandalf.local.home> <20221028183149.2882a29b@gandalf.local.home> <20221028154617.3c63ba68@kernel.org> <27a6a587fee5e9172e41acd16ae1bc1f556fdbd7.camel@redhat.com> <20221103175123.744d0f37@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Nov 2022 17:00:20 -0700 Eric Dumazet wrote: > inet_csk_clear_xmit_timers() can be called multiple times during TCP > socket lifetime. > > (See tcp_disconnect(), which can be followed by another connect() ... and loop) > > Maybe add a second parameter, or add a new > inet_csk_shutdown_xmit_timers() only called from tcp_v4_destroy_sock() ? > I guess. > > > > void inet_csk_delete_keepalive_timer(struct sock *sk) > > { > > - sk_stop_timer(sk, &sk->sk_timer); > > + sk_shutdown_timer(sk, &sk->sk_timer); > > SO_KEEPALIVE can be called multiple times in a TCP socket lifetime, > on/off/on/off/... > > I suggest leaving sk_stop_timer() here. > > Eventually inet_csk_clear_xmit_timers( sk, destroy=true) (or > inet_csk_shutdown_xmit_timers(()) > will be called before the socket is destroyed. OK. Guenter, I posted a new series, but did not include this change. If you want to test that other series, I would suggest to at least add the first part of this patch, otherwise it will trigger. But we want to see if there's other locations of issue that we should care about. -- Steve