From patchwork Mon May 15 16:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 94269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp7105351vqo; Mon, 15 May 2023 11:14:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6mWZTCOFemZ6WkiYV4hHiB1a+5eFMU952WnMJgMFS0Gu/F9C4zag9x2PewwMH3+1nyvXk5 X-Received: by 2002:a17:902:ce84:b0:1ac:a030:c30a with SMTP id f4-20020a170902ce8400b001aca030c30amr30117461plg.19.1684174478264; Mon, 15 May 2023 11:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684174478; cv=none; d=google.com; s=arc-20160816; b=qjqR0a4ZStANb4xyzjwnV1tiM7687CDw+LUIrYClIaTNjK5vIzRD4UiYTaivMHWye9 0bI5Qu246tgXjpzeSx+PZuzqM79XkRfGjfqMpXADanNDJQTSyh1ECvIou1RWrg1fE5aS 99Ql3cPvJxOVKQ2wqr4DZD6D0aElL8fxblGxwoV+Kkyh0diW3xlI16FtxKdeiqaSCImh ni85/gS36W6cTUD6gqKqHn8pwa5ftY8HzE/Ik9WWpLQdSA+wWXbwuPS/Av0g89BnocT+ wtizk+KQzeYvE1vD1w3ak4I/gX1jzy51QqvGDjZSemnN0R8ln6N5ld/bOEyJ51x6jJ53 vBbg== 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=spA9/wKvQQp8cCkpnX7DRWyNLDD+JONKVxCVDevyAbI=; b=Rz+s3cchG23myFEkJqpJLEAgMjtFQePClJ09wwO3fcdQHudZu4c+6GOA6/gc7gHsFq JUnBE5oBh2draxhfaVKB6MYziDxhUFSadTZcU3wx/Ji1afZg/RPbp2rmoulKD1N36+s/ 7vNCWAtxa+4Uvw3tq9de20GgdS3wyEOsljLOsEGFb69jCEwgCezu7YGOFcmFHf6OyBN7 OUsVKvgOekTyMbtOoyQXsUz4v1rrZi1prAsSctXJt5kAKUEJRRAH/CouO6MOqOvmqhAy cnFXPN7h4Btt/jVizOB+9V3PCPgR9fYM22kQwHWzBQCXNBn/1vBzyeV6j2nT/AED2ujD nbVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mryCEN0d; 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 h17-20020a170902f55100b001ab12815159si18440119plf.414.2023.05.15.11.14.25; Mon, 15 May 2023 11:14:38 -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=mryCEN0d; 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 S245008AbjEOSHE (ORCPT + 99 others); Mon, 15 May 2023 14:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242654AbjEOSGi (ORCPT ); Mon, 15 May 2023 14:06:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5D70203ED; Mon, 15 May 2023 11:04:14 -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 33A5A630A4; Mon, 15 May 2023 18:04:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF473C4339B; Mon, 15 May 2023 18:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684173853; bh=Qsn+HbTfAQLFSV/wDrSRpbRctrY6Rac/PUEoQQOQ5z0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mryCEN0d8bd//YKY8duvx8HC8upzEhSMxm6e0uSWBQXF7oNjFYl+KFR8JdqoOpYo6 KEjk08/jV+GBDWz2zGHSIJVX4KowZCboND8Lv6JZKW/B1qvPUREKy+41dC3eCGjUJo sba5ZRy8wKelQWl2ytBGG2D+e99+cijoz591EXLk= 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.4 227/282] rxrpc: Fix hard call timeout units Date: Mon, 15 May 2023 18:30:05 +0200 Message-Id: <20230515161729.036198734@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161722.146344674@linuxfoundation.org> References: <20230515161722.146344674@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765984937632567588?= X-GMAIL-MSGID: =?utf-8?q?1765984937632567588?= 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 1cb90d32d553d..3439d14168e81 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -738,7 +738,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len) /* Fall through */ 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);