Received: by 2002:ac8:71d8:0:b0:40f:fb00:664b with SMTP id i24csp218841qtp; Fri, 4 Aug 2023 08:55:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFB0rD1dtXlHevHn0cwtVbrLaAulmm1+QMRmEF8P8LpXG4h4QwGdEUu2MsCZzO3rBNcJ6YF X-Received: by 2002:a17:90a:9504:b0:269:1abd:3ba6 with SMTP id t4-20020a17090a950400b002691abd3ba6mr1903697pjo.28.1691164555606; Fri, 04 Aug 2023 08:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691164555; cv=none; d=google.com; s=arc-20160816; b=oPzl3jZrlTL0YANATeN0RDwAtrR/2gFlmU6B6mkUquWJftRKFW1IfZ/WCsrjpYNVJK 62KVy7M5/zojLwohPpycjf/SfhxR7QV/LGOohmd3U9z62aKfuIpHHjt+aBxe5K70PZ19 C5GSkY9njNOr+fdMQOljeUVqnbhC4u8CJsEW+JmcsOX6JbBTYgmzhPzmEFMz5Yx4jLQy bE4Tyswx9FknGR7kGYOW/DgyFqmRbTBia1XIgD+43XocxwSkRkLy9PJqw4hlskPTitO2 v8D0FXFXhgUsXNVv5AIuUg4aWwL6iFlufzutIyCBJiEXeo7MKj5ZG02oB+YRd3yLJ/DZ AGRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ExzJzCWYSFK5ETJBSbY+7zclrps++XRInh5NBUCythU=; fh=p7Jx142sm3y+ImYVS0/T1FEz17whXDZ3ulrx9V1apIc=; b=xw8m6jdFXP96qW4N8JtX9k00o2mvxssdEiBQlV+ECX+OP+hm8LqGu0GE88twfTPfQL KDRK0fYiqgsBzGHzgIAkaJTbNDUbAxBfRJ1mvot2odNGHfqklMWLSXrzTRweClGIg9iS 57outnhLst35sHKEZuS7GI405M0hZ/YQbYprJhQ72WFdQb/Se3Zuz3G9tsQsIhp24cc9 ovx2XkDs6fTIH7T0YSBWEbpWifqr8CNgG5ehi2Pw3/nK9M6LsAbOrz5aultQoA+FEcfR 9WlmLw53/3P2PyiVog4t4OdQ1YBvYqv6fGcr1CBRZoGe3dJYqNxhNw1FuguX7Ke03hAg 0lbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RzEM09zv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb13-20020a17090ae7cd00b00263d559dbf1si5540227pjb.55.2023.08.04.08.55.36; Fri, 04 Aug 2023 08:55:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=RzEM09zv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S229685AbjHDPgA (ORCPT + 99 others); Fri, 4 Aug 2023 11:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjHDPf7 (ORCPT ); Fri, 4 Aug 2023 11:35:59 -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 02EAC49D4 for ; Fri, 4 Aug 2023 08:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691163316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ExzJzCWYSFK5ETJBSbY+7zclrps++XRInh5NBUCythU=; b=RzEM09zv7/otbRXaSyFojDA57MsUc1i6Lc2B9FWBWeNiz6UporfRXSensDXW6iZS/T1rSg oXgvHLKwaxOY1z+0MklaMTahvaXYksRFWN+VyfGg+XI6iPHgts5N3i/ddK3/xtciYvixGZ DKC65ztyHeEEQ5jGtc9nAQarm2mdUP0= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-UTQ5Vb-ANSOPsPGTHvWDCQ-1; Fri, 04 Aug 2023 11:35:14 -0400 X-MC-Unique: UTQ5Vb-ANSOPsPGTHvWDCQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6847A29AB400; Fri, 4 Aug 2023 15:35:14 +0000 (UTC) Received: from [192.168.37.1] (unknown [10.22.50.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C0585F7FB8; Fri, 4 Aug 2023 15:35:13 +0000 (UTC) From: Benjamin Coddington To: Jeff Layton Cc: Chuck Lever , linux-nfs@vger.kernel.org Subject: Re: [PATCH] nfsd: Fix race to FREE_STATEID and cl_revoked Date: Fri, 04 Aug 2023 11:35:12 -0400 Message-ID: <2F29BA80-0545-4AD3-8C18-109AA32CC144@redhat.com> In-Reply-To: <7e6053d48b2e4d62c7875e76653ecbc7557ec8d4.camel@kernel.org> References: <7e6053d48b2e4d62c7875e76653ecbc7557ec8d4.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.1 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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-nfs@vger.kernel.org On 4 Aug 2023, at 11:33, Jeff Layton wrote: > On Fri, 2023-08-04 at 11:02 -0400, Chuck Lever wrote: >> On Fri, Aug 04, 2023 at 10:52:20AM -0400, Benjamin Coddington wrote: >>> We have some reports of linux NFS clients that cannot satisfy a linux knfsd >>> server that always sets SEQ4_STATUS_RECALLABLE_STATE_REVOKED even though >>> those clients repeatedly walk all their known state using TEST_STATEID and >>> receive NFS4_OK for all. >>> >>> Its possible for revoke_delegation() to set NFS4_REVOKED_DELEG_STID, then >>> nfsd4_free_stateid() finds the delegation and returns NFS4_OK to >>> FREE_STATEID. Afterward, revoke_delegation() moves the same delegation to >>> cl_revoked. This would produce the observed client/server effect. >>> >>> Fix this by ensuring that the setting of sc_type to NFS4_REVOKED_DELEG_STID >>> and move to cl_revoked happens within the same cl_lock. This will allow >>> nfsd4_free_stateid() to properly remove the delegation from cl_revoked. >>> >>> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2217103 >>> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2176575 >>> Signed-off-by: Benjamin Coddington >> >> Hi Ben, does this fix deserve: >> >> Cc: stable@vger.kernel.org # v4.17+ >> >> ?? >> > > What's special about v4.17? Is there a patch that broke it that went > into that release? Before 0af6e690f0d4e the patch won't apply. Ben