Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp947131pxb; Wed, 6 Apr 2022 05:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3LvwMh3IpTtdN0TUpvFVmkjTlcQ9EEhh/JAtB5dGgIRPCkVel7NZ87xub2S2pnMtQ6D+z X-Received: by 2002:a05:6602:2e12:b0:649:e513:621a with SMTP id o18-20020a0566022e1200b00649e513621amr3830917iow.89.1649246657741; Wed, 06 Apr 2022 05:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649246657; cv=none; d=google.com; s=arc-20160816; b=f/1ig6b3iWSJ1eN52veKZiFwhtIywz8T9i7eCRPy3UiLYI6hg+ldtqMCax2JGP2Au5 JnCROzh177soc/dirXjhlaUMUKZVr1xoSboPpVwVjYWNiPtBRu7x5DybGbBrTq3JEWVV hxSVG5qt7zFQjUfTo6BuZJUMGvXZSd5lGF3GFkoA52IAZEcjmAw33u/BOcrSpxVzw/ex XzwYOJJt6mmissgxmK6PEwmxkcaeor2noQvwWnNTXixshBkvgDiXlUIUPg/yMmywjbhv XpZsQpKvRmuB5+u1LPBAkfgNC8J3ILxmU9gx5oQUMjbU32rru+GrXA7fv7VA+6TU84P+ qUEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eXr8IamJylLfIua3DtFppcIr9Q9SeuhTFtEc69jCpw4=; b=mqTVphDpkihUeAY6byFuZoYyWiun1kxjkBXHSys2KDbmbJptbBN2NkRsJs7ENGnYJm xU8DHQI1u1pMD6AFqYiVifg9HBjCr/u9JtdaieMdW2/mGtK+ly4FDvmrIQ2FcundOLv7 JENCORWm6knhT+k640xDC7uWtpMswrS0bK3g5dlKI5jH43uhIvzAmOiE3ag1KITh7Rmz kZHC2FuoONjYL8WrmfenTyJkPJcFoQRbnPX7WhRoqccs7T9r1mv7MTRAKYHMg5JsZgZ0 6Pr/6dvfE+1ELF7j3lLwrFdOAdAr9aBOLACaCuAMw9Xp3c8K7IOs7oHhQ098CQrVD2+f X0vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QnjkRZdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d12-20020a056e021c4c00b002c9a852c527si11675888ilg.19.2022.04.06.05.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:04:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QnjkRZdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04E071A54CF; Wed, 6 Apr 2022 03:31:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1452503AbiDEWcA (ORCPT + 99 others); Tue, 5 Apr 2022 18:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349374AbiDEJtp (ORCPT ); Tue, 5 Apr 2022 05:49:45 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A690F13FBF; Tue, 5 Apr 2022 02:44:36 -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 sin.source.kernel.org (Postfix) with ESMTPS id 157E0CE1C90; Tue, 5 Apr 2022 09:44:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FF51C385A3; Tue, 5 Apr 2022 09:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151873; bh=pfUa9LayJvonNRTRyNr0npSc/ylo332Q3BdAw9/BZgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnjkRZdXKlV6cIVJ8aq52Ra+uu3a2eFN62g5bsznocGKjo6qMwjWu8lrUC5HOcQ+H mUFYsP/dCcwSkXOM22N7RG5Xw5l2O866MLyIX6W6XMNTEjLIRhT3KYAeGVxcQg8BwB XvCNgunEgtur2WZUqHa7oCi5PI7NwRwoVknCsfYE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ying Xue , Hoang Le , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 571/913] tipc: fix the timer expires after interval 100ms Date: Tue, 5 Apr 2022 09:27:13 +0200 Message-Id: <20220405070356.959803260@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hoang Le [ Upstream commit 6a7d8cff4a3301087dd139293e9bddcf63827282 ] In the timer callback function tipc_sk_timeout(), we're trying to reschedule another timeout to retransmit a setup request if destination link is congested. But we use the incorrect timeout value (msecs_to_jiffies(100)) instead of (jiffies + msecs_to_jiffies(100)), so that the timer expires immediately, it's irrelevant for original description. In this commit we correct the timeout value in sk_reset_timer() Fixes: 6787927475e5 ("tipc: buffer overflow handling in listener socket") Acked-by: Ying Xue Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20220321042229.314288-1-hoang.h.le@dektech.com.au Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/tipc/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 7545321c3440..17f8c523e33b 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2852,7 +2852,8 @@ static void tipc_sk_retry_connect(struct sock *sk, struct sk_buff_head *list) /* Try again later if dest link is congested */ if (tsk->cong_link_cnt) { - sk_reset_timer(sk, &sk->sk_timer, msecs_to_jiffies(100)); + sk_reset_timer(sk, &sk->sk_timer, + jiffies + msecs_to_jiffies(100)); return; } /* Prepare SYN for retransmit */ -- 2.34.1