Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp263641ybv; Wed, 19 Feb 2020 21:04:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxh51srt3YZ7ZvvWbm/sD2sKuBwVkdgI/Y8b6Zjf73n7wR7h44JU9bbc3yGXTqsPtMaV5ND X-Received: by 2002:a9d:6251:: with SMTP id i17mr22840560otk.14.1582175093753; Wed, 19 Feb 2020 21:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582175093; cv=none; d=google.com; s=arc-20160816; b=xwF5aWRbwwSuTkTxdvIskEQ0vFQ3+Y771ac9qfrnTxOdV89MM78RnPr1s6HSqWhGdu LNCfkUonnSpdMBaBZ4Jl4BTn1Uqido3zyb9OVIgVzOKw7CJGCwnm8bwGClbkmIpdz0Rc pe8/stcIbTwdhiAghw26HOUDE+NKr2Bzy2DjkKz5oEzmLUwkJXwy5yG34qTyBTcAo1MO JsPwQfOlJi5qmGAJwEAJIQ+9mwo05ZpzVrKGdfNpx+m+ISqyf2JrVskU/nP8rNvyrtmc 0jBjYUtKG3RyznikApGjtbHVdHIfaLVBA4zr9qlJJoXrPuAH290SX87rzYydZu6HtRSS 8azA== 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; bh=Xt0ain4A6nH7931CREGDnvbYIga7RNb3HqyJdzCHZDU=; b=kngVqx0cuXrD0agMZs6/+xCPKfUbS72KHoC4P9praV6XiHTd50LSjzoELR6haGoaxq fGkXvFbwHNwCI9U4hFBswLq+5JxiQrh2mLyeKOnVlc2SyuQjTkXxxz38unqP2SkfreFP RH/BKlcqNfmY+bI6Z+5S4bmBa8k6YLTtGIt5RuPZ42WTPfnsGSHCirjXs/qJ/MYTxz8x TtekGghzQ5F1rAMGKX8NNgTz+T0nZhTz/zlO4guIiQB0BTryCRfO01gOVjRS0iLczlqY O8yTWPsLmFXRUwJ6sdBVR1cFzFSf/lwG6HjbBV3Auxe/LYeMs/NpBywi+SYgKh6ofu5e h0pQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u204si9902356oia.55.2020.02.19.21.04.40; Wed, 19 Feb 2020 21:04:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725857AbgBTFEk (ORCPT + 99 others); Thu, 20 Feb 2020 00:04:40 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:43875 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725811AbgBTFEk (ORCPT ); Thu, 20 Feb 2020 00:04:40 -0500 Received: from callcc.thunk.org (guestnat-104-133-8-109.corp.google.com [104.133.8.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01K54WZ1027068 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2020 00:04:33 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id E9D5A4211EF; Thu, 20 Feb 2020 00:04:31 -0500 (EST) Date: Thu, 20 Feb 2020 00:04:31 -0500 From: "Theodore Y. Ts'o" To: Suraj Jitindar Singh Cc: linux-ext4@vger.kernel.org, sblbir@amazon.com, sjitindarsingh@gmail.com, stable@vger-kernel.org Subject: Re: [PATCH 1/3] ext4: introduce macro sbi_array_rcu_deref() to access rcu protected fields Message-ID: <20200220050431.GE476845@mit.edu> References: <20200219030851.2678-1-surajjs@amazon.com> <20200219030851.2678-2-surajjs@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219030851.2678-2-surajjs@amazon.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Feb 18, 2020 at 07:08:49PM -0800, Suraj Jitindar Singh wrote: > The s_group_desc field in the super block info (sbi) is protected by rcu to > prevent access to an invalid pointer during online resize operations. > There are 2 other arrays in sbi, s_group_info and s_flex_groups, which > require similar rcu protection which is introduced in the subsequent > patches. Introduce a helper macro sbi_array_rcu_deref() to be used to > provide rcu protected access to such fields. > > Also update the current s_group_desc access site to use the macro. > > Signed-off-by: Suraj Jitindar Singh > Cc: stable@vger-kernel.org Thanks, applied with the simplification suggested by Balbir. Also note that I generally use stable@kernel.org instead of stable@vger.kernel.org, since that avoids sending excess mail to stable@vger.kernel.org mailing list. (The stable kernel scripts look for stable@kernel.org as well as stable@vger.kernel.org.) I've made that change in the version of the patch that I applied. - Ted