From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2B6238DE1 for ; Fri, 13 Dec 2024 13:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734097135; cv=none; b=lzvuNx/CrNYy8FGf4YKyIo4fzHfVY/scY/rt26AVy/m1F/Dpxa+XpLfeTNg1nWG9qHt3eYbcEGs9sFLVdS1+hPgK6xBz8TiQnmiEMtvT0MQQMXLGMdJ5j1mV97hF6K1gkPBraFlCs5cimifuZnvq8NWsuHu/IFpV3dmcG+wIkF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734097135; c=relaxed/simple; bh=5RZh7hnP3yWoi+qXTAw32Ht7P/z+WccKnzz3BgXMpRs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iskfd68fX0Z8V5rLsT7flD9rJvIu7EqNZU6dS+nOowIk3U/yVqJdJ7FpDYZ73VwKytS6DX1CEPOMAlp+NF7w8JurW6B0ia6s/0Yg62gaLSjA5ejnDrXafrTW+1vp01ACsOnlJX8bf7fVH2+F5sedEuTspkxOOkMmZAG3AYXnPWc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oHV33kyS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oHV33kyS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA32BC4CED0; Fri, 13 Dec 2024 13:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734097135; bh=5RZh7hnP3yWoi+qXTAw32Ht7P/z+WccKnzz3BgXMpRs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oHV33kySg59RojrVWR0d4EL5X5iJeeyCVwwBfifZOShteZT3/UaHGcK+lRcWYT3NA wUimb8BRkSnCNiC1D9pVUCbVlMCzPXjQ/tPiwdqP89WRWDtQyV7EqB2o9KeMLdM9l3 aXltBNUucNq9aPqkh7BmP7nI6iRnuh/IWNqQI/T/go4phxSfngYc1HOyGsarBpyZaA Vq/quN6phphz6Onk6gSLrlM2zcHgl2sIT/iVKQolRUCQIYZbF1gv2MyafZiXw492jf ULqFXNSmoqjwBNCSnnimzx9tkP8PW+n1jwCopEl0p3x9ddO3cmhjl2+EaDO+W6A19Y /2/56UqawA7hQ== Date: Fri, 13 Dec 2024 14:38:52 +0100 From: Frederic Weisbecker To: Ankur Arora Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, paulmck@kernel.org, mingo@kernel.org, bigeasy@linutronix.de, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, efault@gmx.de, sshegde@linux.ibm.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v3 4/7] rcu: handle unstable rdp in rcu_read_unlock_strict() Message-ID: References: <20241213040658.2282640-1-ankur.a.arora@oracle.com> <20241213040658.2282640-5-ankur.a.arora@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241213040658.2282640-5-ankur.a.arora@oracle.com> Le Thu, Dec 12, 2024 at 08:06:55PM -0800, Ankur Arora a écrit : > rcu_read_unlock_strict() can be called with preemption enabled > which can make for an unstable rdp and a racy norm value. > > Fix this by dropping the preempt-count in __rcu_read_unlock() > after the call to rcu_read_unlock_strict(), adjusting the > preempt-count check appropriately. > > Suggested-by: Frederic Weisbecker > Signed-off-by: Ankur Arora Reviewed-by: Frederic Weisbecker