From patchwork Fri Apr 28 20:27:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 8772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1194644vqo; Fri, 28 Apr 2023 13:30:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xNRzcL6JwTjFUrJidq52p1ezgJQNCqheuysfBEqD58fGNhZHnT2uZjeiu7EOCk00JMOO2 X-Received: by 2002:a17:902:d510:b0:1a9:631b:7d68 with SMTP id b16-20020a170902d51000b001a9631b7d68mr7617170plg.8.1682713848395; Fri, 28 Apr 2023 13:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682713848; cv=none; d=google.com; s=arc-20160816; b=K0CdyMvokk4a0DNjCq6ezJLsYCg8c2n6MOstHnorsPno/QMTKVknmC7VPhKrK1VH7u v6yyU6TWHoOv93u6mednqWx5sY/Oh1VAY9T95q4iSTcV79MxyMoweme11JTLaRvhocby aXgcMnNDk6LQ+3uFAyk1DoxPqkseDIVqNPo4Y+TV2/862Ec1yVkaGV2zqEwcab8bq41W PEdI3AlI3VST4ToQllh9NOc0Y/DfhHp7XJIN9fpQK/1uL1qqNXOkPG5p3pWms1APbau7 U9gis8ltO9jAIuK0guJZemuA7EzWlnkFRvTUGOqIQybDiFpfotisbHs3Vd2zB88UJpO3 GFxw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Uy6dRgRnvqm17ecZ+ZFNSRr8vcB2QgAYx8cCPhO/llU=; b=0yNfZTsXO4i9AQwPDjksmE285nDkobT3S698NPvWIhZERVIQ0i3ZVWMrU0HNUPt+Xv kGIG1S7RJoZ3D9CAOa1AFX3IH8DFOrjnN5C2s7wVBpCssIQONLUiN+DvBBMG2Di1pcRD C9QsBzgHMTzly44FM9IPn6DMRqfDR+8JzxOx6yKcLOHmMG+paJSUynV/V9S68LfJiHsi axwCbZ8V3kcLZsRtlboPnuPrCdriCOvPG4XbTe82Ym0aRE7q1VvF9NsrBdQIpBd619ch 5GTB+L70yi3wwmJ3e/nL2JSnNMULDlCyRAKV6nxmTtP2XOa/3gPGAok/jCHDfJEmzZ1k fJFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KiWb2R0J; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902d58c00b001a21fd27407si22297327plh.469.2023.04.28.13.30.33; Fri, 28 Apr 2023 13:30:48 -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=@redhat.com header.s=mimecast20190719 header.b=KiWb2R0J; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346634AbjD1U30 (ORCPT + 99 others); Fri, 28 Apr 2023 16:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346583AbjD1U3H (ORCPT ); Fri, 28 Apr 2023 16:29:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 227FC2716 for ; Fri, 28 Apr 2023 13:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682713686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Uy6dRgRnvqm17ecZ+ZFNSRr8vcB2QgAYx8cCPhO/llU=; b=KiWb2R0JzukjvOqDfwW3aoIkGH+lkovjKIGaP7WrvFJQAuX7btqfB17AQjbqemeMyTNV0W 0IZgqubBO8CzZClJetR7WD7DCaExbgDCeFt4ju4+BPzwrY3ih5iA1DLh5z7c5uxXN9QxZB Zh9Qn6rsGsJg1miTOqPEa4wJqEb1Ipo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-373-Z8iOFh6iOEyyoDIYLjlA-w-1; Fri, 28 Apr 2023 16:28:02 -0400 X-MC-Unique: Z8iOFh6iOEyyoDIYLjlA-w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F8D9185A79C; Fri, 28 Apr 2023 20:28:01 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A9142027043; Fri, 28 Apr 2023 20:28:00 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 0/3] rxrpc: Timeout handling fixes Date: Fri, 28 Apr 2023 21:27:53 +0100 Message-Id: <20230428202756.1186269-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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?1764453356569612730?= X-GMAIL-MSGID: =?utf-8?q?1764453356569612730?= Here are three patches to fix timeouts handling in AF_RXRPC: (1) The hard call timeout should be interpreted in seconds, not milliseconds. (2) Allow a waiting call to be aborted (thereby cancelling the call) in the case a signal interrupts sendmsg() and leaves it hanging until it is granted a channel on a connection. (3) Kernel-generated calls get the timer started on them even if they're still waiting to be attached to a connection. If the timer expires before the wait is complete and a conn is attached, an oops will occur. David --- The patches can be found here also: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David Howells (3): rxrpc: Fix hard call timeout units rxrpc: Make it so that a waiting process can be aborted rxrpc: Fix timeout of a call that hasn't yet been granted a channel fs/afs/afs.h | 4 ++-- fs/afs/internal.h | 2 +- fs/afs/rxrpc.c | 8 +++----- include/net/af_rxrpc.h | 21 +++++++++++---------- net/rxrpc/af_rxrpc.c | 3 +++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_object.c | 9 ++++++++- net/rxrpc/sendmsg.c | 10 +++++++--- 8 files changed, 36 insertions(+), 22 deletions(-)