From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] strparser: Do not call mod_delayed_work with a timeout of LONG_MAX Date: Sun, 22 Apr 2018 21:10:49 -0400 (EDT) Message-ID: <20180422.211049.958453704079603120.davem@davemloft.net> References: <20180420191111.683209-1-doronrk@fb.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: tj@kernel.org, netdev@vger.kernel.org To: doronrk@fb.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:42490 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753824AbeDWBKu (ORCPT ); Sun, 22 Apr 2018 21:10:50 -0400 In-Reply-To: <20180420191111.683209-1-doronrk@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Doron Roberts-Kedes Date: Fri, 20 Apr 2018 12:11:11 -0700 > struct sock's sk_rcvtimeo is initialized to > LONG_MAX/MAX_SCHEDULE_TIMEOUT in sock_init_data. Calling > mod_delayed_work with a timeout of LONG_MAX causes spurious execution of > the work function. timer->expires is set equal to jiffies + LONG_MAX. > When timer_base->clk falls behind the current value of jiffies, > the delta between timer_base->clk and jiffies + LONG_MAX causes the > expiration to be in the past. Returning early from strp_start_timer if > timeo == LONG_MAX solves this problem. > > Found while testing net/tls_sw recv path. > > Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") > Reviewed-by: Tejun Heo > Signed-off-by: Doron Roberts-Kedes Applied and queued up for -stable, thanks.