Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2244672ioo; Mon, 23 May 2022 13:43:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywcde9wmeLpfOvE9wd08ZqDByqQlVu7OxSV7kdfVmo24Q2HEh0K64qgCQdX+PenMwaLtDB X-Received: by 2002:a05:6402:d64:b0:42a:9bce:1eb6 with SMTP id ec36-20020a0564020d6400b0042a9bce1eb6mr25754838edb.125.1653338614316; Mon, 23 May 2022 13:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653338614; cv=none; d=google.com; s=arc-20160816; b=oQMHPwe9RrJsow40faLh74wMxj9j/ZNkmlAlewcMcuG/8WSh4uQdAlX4M1YUeFSQ5N QpzDebb18ur8b7ESpkvXC3ltfNSeu7m/RVI5K/QWgpYNxkJaB6kXQYOfvtGR6TV6WZfl zjbOw6VnI2V7otEU2gqkY4U0pZ52BFWeSsSRUrCMdgfyPpXGgVfgHugxKRNJSzWs067o n0YgY71JndYeWo/I7/K2hioVbYASXz7oIrN1DDb/rukGB0m5em8kCIWcVJCZSysnsm0W OX0WwAri9Yt2dO5uMmSYUARPyiG0SAlCk4W6C5wFmvGVCxkHZYUD0Bq0EJ/X/6zp+7SB jmEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date :dkim-signature:dkim-filter; bh=SBHIo/znkHovymBT+o2wP7JsHvO6Lw/1F6kQ+mmf6vc=; b=wxAOVe0PJ01ME+5uKknMtTFdrRiqg7RNwP4la4cfpe8U3b+hdhTMwgTrHb9S5JA2X6 iqUMHOLXomKPUeo5bOiVXWpz5olX4YuXZgYPyIsVOzaRSLM0tSTWgBM+1Z1Jl0gFwrLC xrfkN06uMsBbmdG2F051UafR1dhm8+a010+DUp9gXDJxlDQVoJSAHe2fkPe49qcpLmf9 X9tYmsIUlPbd894PtcM046XTpLfn4EXmW9cAHStZlZ+hQ5VmyIfKq+gqw4YWcrqznp9T nwVlZ7VzJTUfhn1dz4IlyO//Oi5x9cqjfqxFJbt5fPBSnnK6BddcFfKSsS3LeJPKcdJO DamQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=jGCaYgRv; 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=fieldses.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc17-20020a170907169100b006df9153e00bsi10846658ejc.10.2022.05.23.13.43.04; Mon, 23 May 2022 13:43:34 -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=@fieldses.org header.s=default header.b=jGCaYgRv; 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=fieldses.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232740AbiEWU3k (ORCPT + 99 others); Mon, 23 May 2022 16:29:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232303AbiEWU3j (ORCPT ); Mon, 23 May 2022 16:29:39 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACFBA41F90 for ; Mon, 23 May 2022 13:29:38 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 1F39E6C90; Mon, 23 May 2022 16:29:38 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 1F39E6C90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1653337778; bh=SBHIo/znkHovymBT+o2wP7JsHvO6Lw/1F6kQ+mmf6vc=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=jGCaYgRvGM2QITiQanrZFaPxIajGNlfHFVwpKQykNkLpC6tIL0zqfBLgFRATaiLdL ISLPNzI9XUhQeZw8A4UgWbrvRclOOgzUOhfZmPzOegM+yft3KzETpnLBv923mJQeBY 6LEzvWECH3qzPiLJkLlzDrxH79manpvuOWnF/lWU= Date: Mon, 23 May 2022 16:29:38 -0400 To: Jeff Layton Cc: Chuck Lever III , Trond Myklebust , Linux NFS Mailing List Subject: Re: [PATCH RFC] NFSD: Fix possible sleep during nfsd4_release_lockowner() Message-ID: <20220523202938.GJ24163@fieldses.org> References: <510282CB-38D3-438A-AF8A-9AC2519FCEF7@oracle.com> <1A37E2B5-8113-48D6-AF7C-5381F364D99E@oracle.com> <93d11e12532f5a10153d3702100271f70373bce6.camel@hammerspace.com> <5dfbc622c9ab70af5e4a664f9ae03b7ed659e8ac.camel@hammerspace.com> <17007994486027de807d80dfde1a716c3d127de1.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17007994486027de807d80dfde1a716c3d127de1.camel@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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-nfs@vger.kernel.org On Mon, May 23, 2022 at 03:36:27PM -0400, Jeff Layton wrote: > The other lockowner _is_ involved. It's the one holding the conflicting > lock. nfs4_set_lock_denied copies info from the conflicting lockowner > into the LOCK/LOCKT response. That's safe now because it holds a > reference to the owner. At one point it wasn't (see commit aef9583b234a4 > "NFSD: Get reference of lockowner when coping file_lock", which fixed > that). I doubt that commit fixed the whole problem, for what it's worth. What if the client holding the conflicting lock expires before we get to nfs4_set_lock_denied? --b.