Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp704697pxb; Tue, 5 Apr 2022 19:33:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ5odGhNyQwk6HtmUhNmavJyppwciSvVqgHVvZP/fysZUx3O+uUwqq5fkq0GmQavcEMtTG X-Received: by 2002:a05:6a00:a8b:b0:4cd:6030:4df3 with SMTP id b11-20020a056a000a8b00b004cd60304df3mr6595721pfl.40.1649212392270; Tue, 05 Apr 2022 19:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212392; cv=none; d=google.com; s=arc-20160816; b=dNoApMjlKqD2hxe9T/ic+CipOyO3ElWTOa52h1vuuYUMUe7Byx0UQ/P1LURtKkFYwH NhjSXlkPnloG66vKGW0exd9bzjAl6uu33hrUZjrwEwkvu/Sv1KIk0EBp9O1wIfwcQkkZ o68kJScz17Y3oLmTbpU78iSj3Yz8Fi1N/uSPE92157qxvbMRpd5d/m77oQ2y+shkphvd HkAy6xwWU9G0waDdFqGStn1qsYLxSlMDMUbju+wVNNcI2xhgD2k8ZJXOJaQsOqgy5quN UmNRLSdMxfli3SlvJjoL7esmRUJMAwFO5Eg/wYZGrHXU76H/aciiOqgxp0ywaJE5CpMe c+LA== 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=rhtIuO9DrjcqFgP8jCdFMFv9Jn6hZBOjFRvKa9bxO0MliQzxK9aqTQY1mW3xulEFaN EgjPCl1X24Dh2TsMHgf/VdKsCan3FuMOwaCCLMsex6B+xcAGAFKiHwlZ1amEVVIQV95j IH6lgw+wD3VI1ObKgNrGmfaxGojUVsBi2BPeK4ruv9DNldrKlJruiO2gpC0vCA1DyvKa /NKxGqRYHKDGDkVBTEJfEp2qILjX+FgCoOAWrrE084OYXtLqB5+1yvrNeZX9dmHW9vvU DWQbjCQzvYcKta3qVFyEaAvOyfAzLOHXsJE2pNx1VYNrcECx7Zt4kfD5ZI3/s5ZnZ8Y9 3Ukg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ePllKA3J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u62-20020a638541000000b00381ee9a9730si14648394pgd.407.2022.04.05.19.32.57; Tue, 05 Apr 2022 19:33:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ePllKA3J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343692AbiDENE4 (ORCPT + 99 others); Tue, 5 Apr 2022 09:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240508AbiDEJQR (ORCPT ); Tue, 5 Apr 2022 05:16:17 -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 012471021; Tue, 5 Apr 2022 02:02:01 -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 AC370B80DA1; Tue, 5 Apr 2022 09:02:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C8BBC385A0; Tue, 5 Apr 2022 09:01:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149319; bh=pfUa9LayJvonNRTRyNr0npSc/ylo332Q3BdAw9/BZgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ePllKA3J1JrbmPgg19vY3ZztgnPI1gx9kBfJWuDUO5mrnrs4MsnDHoZ1Q6Mv4kaoH MsYLCNRBJOwYTH3Tj9BKbT8xSnSKzEIe3nuXFk7jp4G7GDQN3hd0ImHqGNBUwIY++5 hvqqXH3Be/JjCS85SS6EwRZKBDxJa8RJ6e+BaWVs= 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.16 0635/1017] tipc: fix the timer expires after interval 100ms Date: Tue, 5 Apr 2022 09:25:48 +0200 Message-Id: <20220405070413.132774458@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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