From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47EE4EE0210 for ; Wed, 13 Sep 2023 22:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232972AbjIMWHc (ORCPT ); Wed, 13 Sep 2023 18:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbjIMWHb (ORCPT ); Wed, 13 Sep 2023 18:07:31 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88B89199F for ; Wed, 13 Sep 2023 15:07:27 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1c3887039d4so2329145ad.1 for ; Wed, 13 Sep 2023 15:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1694642847; x=1695247647; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fxDfuaaCOGIkY/J7UCucAcZfBxGD0O7N2E+zpPv/A2A=; b=jOHPy3ruaBE5qFzc9ldCHn0VON770hgjGuV8uGeSixVmPSAAx6XwxyvPZ6c8qvm/li bsB48BIioFGP5F4W67eldUtaIPc/fYEZADn/8YFBtFgXdVm9AD1W0A7JzBf+choJwFzj w9/fi9bS8xWE9HoMFdwluFoKdGgTUC5vDOT8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694642847; x=1695247647; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fxDfuaaCOGIkY/J7UCucAcZfBxGD0O7N2E+zpPv/A2A=; b=CcYK0jdDux2fjEvAQzwRAILdZDkYd9qMl8MwJk9OZSN1NOaPOQHSCWNMmYyYmJUUlM wPWtRLDYmIDALttb1TQv1pMI3K3pQSCiVCsqCy1Ly5x7iq58FIOHhrnbFTJKwTFYCk3G 7aVxwNaJNPMDilgD5fOk+ALrE84Bnl0bZWYhqkz4l7Kl6e6kIwZ9qfhixPwEqQQFtWOX 9n9Pgvw9Yquc6W4YY6nh4nia9hv1luILwuc0fUvZsWtZmgLY+U2vilSHuqEkyeGjMQSg 87GKX2dWNYWDryGBujKtbceQB2KUkegUwfJJsOUVDzB/2bpZztU1vvsXlgQ47DQ3VHHf oiIA== X-Gm-Message-State: AOJu0Yzegjs6iD/B9fcJYrij75ytiwwewnKsBhq0n8zNt6uQA/EMuSYX NF3zmcbTV1aqgakB+nF9ehpe0Q== X-Google-Smtp-Source: AGHT+IHxaT5/+ccui2vnFiQVAeKtjd2URt+LuOsqD0F5iWtHIS5/zUtL5g0V6xehNx6RA+H3QM0vDQ== X-Received: by 2002:a17:902:ecca:b0:1c4:62a:e4a with SMTP id a10-20020a170902ecca00b001c4062a0e4amr576300plh.64.1694642846953; Wed, 13 Sep 2023 15:07:26 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ee8900b001bf095dfb76sm97776pld.237.2023.09.13.15.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 15:07:26 -0700 (PDT) Date: Wed, 13 Sep 2023 15:07:25 -0700 From: Kees Cook To: Christoph Hellwig Cc: Christian Brauner , Al Viro , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Fenghua Yu , Reinette Chatre , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dennis Dalessandro , Tejun Heo , Trond Myklebust , Anna Schumaker , Damien Le Moal , Naohiro Aota , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org, linux-hardening@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH 08/19] pstore: shrink the pstore_sb_lock critical section in pstore_kill_sb Message-ID: <202309131507.E20F3AA130@keescook> References: <20230913111013.77623-1-hch@lst.de> <20230913111013.77623-9-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913111013.77623-9-hch@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, Sep 13, 2023 at 08:10:02AM -0300, Christoph Hellwig wrote: > ->kill_sb can't race with creating ->fill_super because pstore is a > _single file system that only ever has a single sb instance, and we wait > for the previous one to go away before creating a new one. Reduce > the critical section so that is is not held over generic_shutdown_super. > > Signed-off-by: Christoph Hellwig Thanks for the refactoring! Reviewed-by: Kees Cook -- Kees Cook