From patchwork Mon May 15 16:28:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 94256 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp7094417vqo; Mon, 15 May 2023 10:56:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Zf4c2hQ2ZUZTmFO2rvBz1pCpWWQcPutnqT7OdGrwamATVmoHnvYXWT5sFBTnxwx02ArHJ X-Received: by 2002:a05:6a20:a10c:b0:ec:a118:6471 with SMTP id q12-20020a056a20a10c00b000eca1186471mr39459980pzk.50.1684173415758; Mon, 15 May 2023 10:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684173415; cv=none; d=google.com; s=arc-20160816; b=I40blTuvrVnj2ft8cj/e3mEf5GJPsOACjmFxYjhCynnCe1WxM0HqLzPp3YJNbsJmrQ irL4chzpTYZKqCSgYdRVW/GdY29ez0aM8ne4/7wW4ZkddeaS1a0Wv1OG6I+IMauq7rYA hIhHurAqaJQ0lTEH/p1hlyobi1YMfPevNOpyhHkiF2NKAkfEo0vwHO0//6MlvwRBR0Pi 6pAXPiVxfA7YZ7fkN0rAams3KtH0LDZeZueumIJisPuO6/s01IU9C4GThwwyRQ2P9SJO NKdGq8IMzx5djQ76vJPAzx2As3+Z3+q2bO+9alRE0W8vJoTBfLI1eJVSDamJr6IAcsPC AmFA== 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=r8Vby3suRkAqFGBH8+P1vijoxvSLrjEz7GT4qPbmoeY=; b=z/1ri9EFR3s9PFh8nSmO2yA1/4oqpaqnOkN69oYFZ+vHcKi1PjGo5/8Ir2tQO6BHqW SqJSbFTspbpCth/hNSuwK6l2p8ogx1jauhipBu75NfuWMWJ6fXzoVUK9Um0k2XCC+eWi /u80WKQJR+6Z4oMtI0mKGoImRJaFneXnKbKx2PCrLOwJTnXDFrnPJRoHkZL7IqsS/Xy+ 5ojXsq30+MEquxWyvG9mYqELrmNr/pCxXO6hIhv5DxgLcQTmxMaeMosPkIlgVBwtTzj0 h43xFQGeHGgWHSApi3xGKilEIBDVJE95AoAJE6XzQsF/S1jauaOoMhiiQPRbbf12Jgv0 RZCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JpvNX+Ya; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a636e07000000b00513522599casi7663346pgc.831.2023.05.15.10.56.41; Mon, 15 May 2023 10:56:55 -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=JpvNX+Ya; 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 S244270AbjEORaj (ORCPT + 99 others); Mon, 15 May 2023 13:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244355AbjEOR3w (ORCPT ); Mon, 15 May 2023 13:29:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B1CB12EBE; Mon, 15 May 2023 10:27:29 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B9EDB62D12; Mon, 15 May 2023 17:27:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7ADAFC433D2; Mon, 15 May 2023 17:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684171647; bh=43pq+UjSaKTzdKcTZSc3BjZWUVTfug1scezW8PiZqrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JpvNX+YaG4tJFhX2g+ta2Lqd9ttaBntmdSfOrmrkY7aEGcTxyzXlcD3EZB3yHD+Hk 3yjGOczbSA/wFXK4bdAiutdai1L9kf9sETK0MltEP1VeWS7hiL24IruwpOHUGWxDKD b4HYyFnL7fEbP8VTH8Vk75cHc1BuEu7CKM/Buqt4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Sasha Levin Subject: [PATCH 5.15 033/134] rxrpc: Fix hard call timeout units Date: Mon, 15 May 2023 18:28:30 +0200 Message-Id: <20230515161704.200160555@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161702.887638251@linuxfoundation.org> References: <20230515161702.887638251@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765983823504234832?= X-GMAIL-MSGID: =?utf-8?q?1765983823504234832?= From: David Howells [ Upstream commit 0d098d83c5d9e107b2df7f5e11f81492f56d2fe7 ] The hard call timeout is specified in the RXRPC_SET_CALL_TIMEOUT cmsg in seconds, so fix the point at which sendmsg() applies it to the call to convert to jiffies from seconds, not milliseconds. Fixes: a158bdd3247b ("rxrpc: Fix timeout of a call that hasn't yet been granted a channel") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index d4e4e94f4f987..71e40f91dd398 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -736,7 +736,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len) fallthrough; case 1: if (p.call.timeouts.hard > 0) { - j = msecs_to_jiffies(p.call.timeouts.hard); + j = p.call.timeouts.hard * HZ; now = jiffies; j += now; WRITE_ONCE(call->expect_term_by, j);