[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221104015139.58f17730@rorschach.local.home>
Date: Fri, 4 Nov 2022 01:51:39 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Mirko Lindner <mlindner@...vell.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Martin KaFai Lau <martin.lau@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Pavel Begunkov <asml.silence@...il.com>,
Menglong Dong <imagedong@...cent.com>,
linux-usb@...r.kernel.org, linux-wireless@...r.kernel.org,
bridge@...ts.linux-foundation.org, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, lvs-devel@...r.kernel.org,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
tipc-discussion@...ts.sourceforge.net
Subject: Re: [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown()
before freeing timer
On Thu, 3 Nov 2022 17:00:20 -0700
Eric Dumazet <edumazet@...gle.com> 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
Powered by blists - more mailing lists