Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3417844pxb; Wed, 13 Oct 2021 05:44:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpEQHWhF176GiJpQWCA1UbUJAZXG4WDaUVcW76ZYWOwZFQITz/0aOnehHAlFnRKuFZAqNb X-Received: by 2002:a17:906:a106:: with SMTP id t6mr18834889ejy.170.1634129063625; Wed, 13 Oct 2021 05:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634129063; cv=none; d=google.com; s=arc-20160816; b=GW4oWPhdc9RZxCekXKZ2TPCbhJyvHDcEf94V97Hzex5qFkmXCEb+6ZVEgUfBQiZ5pV +pm0d5V2e4RVStvBJEOlc30aRS0g0YnkyEKfSrF56x9+KuuocWoYhm+PIS0QIr0fWvkv WT1uDQZhv9P6+DGXMJawyAsPevTgxOFZ7nzZibCFm9cM7V6sUd5Cbb4BiUWrEJexLQ7b YrqMHMPqjb136pbrRIODTnbEYM4J+r5w4i7Oh/q2t0z7pcXMqbTjeeFe2qbpWNL3IGzl xOYWvhO7b+0uhmvs1qgollzRtHocucEoorSkWrA2c7xN7+73t6mrg4yAcvhdi/1UNTuc SWCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZOJVOG5TPmwro9XVUCu0WLliPWZ0LeekD1uGNl5wZzs=; b=xxner7dJEp99pcyEHbAbIY1Jw7eNWYRBIW4TlYhcF7Nte0LnAPbNnfZx12g8siFB8l lpRnNAcTDqN2ttdBqxJYt4Mrp3pVRNoBOQcQbW++oGKqOA6l2bHS94BKqFeqMJHQEoWf X4etMBQ3vbwoOQ36iyDzNkQqGh1bFdk2WHBuIZjHrJfETNYlu4h0p4Gh2VCNBtjTVl5G qxPzU/u5crMbSyhyumG+YPiUfAg1DeSTSoI8xuDWiiUgmievUqowz4TJq4FDEl4zhdLE wSodqpIZppI5MHTF16tCYkigtagWhqofSNg4lsK9SjwA3k0w/puAeRri4F7cNV8ozoUy 9nvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=i37otEyC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si22590379edm.398.2021.10.13.05.43.58; Wed, 13 Oct 2021 05:44:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=i37otEyC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233169AbhJMMoG (ORCPT + 99 others); Wed, 13 Oct 2021 08:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhJMMoG (ORCPT ); Wed, 13 Oct 2021 08:44:06 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21F66C061570; Wed, 13 Oct 2021 05:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZOJVOG5TPmwro9XVUCu0WLliPWZ0LeekD1uGNl5wZzs=; b=i37otEyCeSc+Ed6QP63HmDUoeK nyEGtCVCdea+zOQT3MR2vMjX2N3nEbH6VeajvaqJCNsy2JKhrs2y7pEZ6SnXyi0QVj23aRsJm6PVa FFIw6hc6ynV2EdXjiuKjytahoIVKcLkHtM9zf6rTdMwn1ujChgk8BK98xOHLJlU791WlJaBfkX35w QxDIXQ3KnNEoAiP4hLSrp68oE1SGAt8phequyiaYWDLk0w3FbCbiOfkLJWj+Nxt8/wQxqec558jly NLNdHzyapNsqVZEXn+FxmyOwcMsL8R55I5P/W4dVtbvPSAjDAcaAsQ8RPgbSUn1QwKImLleH3Ysyd ucatYAkQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mada2-00GdSy-Jx; Wed, 13 Oct 2021 12:41:58 +0000 Date: Wed, 13 Oct 2021 05:41:58 -0700 From: Luis Chamberlain To: Kees Cook Cc: tj@kernel.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, minchan@kernel.org, jeyu@kernel.org, shuah@kernel.org, bvanassche@acm.org, dan.j.williams@intel.com, joe@perches.com, tglx@linutronix.de, rostedt@goodmis.org, linux-spdx@vger.kernel.org, linux-doc@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 09/12] sysfs: fix deadlock race with module removal Message-ID: References: <20210927163805.808907-1-mcgrof@kernel.org> <20210927163805.808907-10-mcgrof@kernel.org> <202110051315.B2165F455@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 03:26:02PM -0700, Luis Chamberlain wrote: > On Tue, Oct 05, 2021 at 01:50:31PM -0700, Kees Cook wrote: > > For example, why does this not work? > > It does for the write case for sure, I mispoke, just for the record, the changes you mentioned actually don't suffice for the test cases in question for test_sysfs, the deadlock still occurs with those changes. At first I thought it did but I had failed to remove my own fix first on fs/kernfs/dir.c. After removing that and just trying the proposed changes I confirm it does not fix the deadlock. Luis