From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 F27EA2236E0; Wed, 28 Jan 2026 17:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769622708; cv=none; b=DyivKoKRrhxSnOI/1feGyF7Au8UCSdWoV9/kZzZvaURlAkZd5JiJ7WkV0nX62g/Cio/rCHRXq2CmyoL0x1Tam0DFm+6dLmbpX6459WdzyR6HAuVULn7GYEjlBJq0LtVpv8CnxR7o+AMicOFkY/OWGZsCGjM0YmxvvBskDHC24w4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769622708; c=relaxed/simple; bh=+rYuf6Lay3x+qEaQsOQJ9d/USniOnx4rlOR2MYCt/VI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EyHXw5vzyJT1gHjhsqVs71rsC9lx5LzgBwE70enOB4Y5EGyYUbmQzpr7SBltgA/zotgA7g0CI6BPqQGx26+Z2HbUXsUvOBQmgWxUB6mD2L4sd0dCCB4Bmgj63Floj1R/rFODtkLGvHvCrAoqCVR/UDrm3iTkOM58PmMxlYUn6ug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=MxKeGCaa; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="MxKeGCaa" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description; bh=eysL419MsOX4yxh3/KQkr+tqqB1Z0JyydTzYujMR0AE=; b=MxKeGCaaqzeZ5hVRojbBat+tG2 3eT9qwlTd1BoGUbbAHaH8hG++McYPoF16V2kZc0DldsKeEOYjSZ2QONTcskMGtpHrCxHb52x6b0My 7VE/XeiJmzJCM0ogPdxqBeLwq7XrMl3DFRwjXVxLtesHQFMQfQiwoDCiUod5OtymxFHLiVr3gr4m8 mZpEPwyagPwfSFwzWYCxUrcLQdSCUaN0KTeqjCJzI5/dbI/kfpt2Lak5LRRd9d2JAL9I0vvzgoO42 lmCk9dZiHG1Kw8nH/KgdUnzGA4t19qoDO2JYo/WlZym+j2m3ucysGm8YnTMJOF3NlvEJv278vbblf hLWbCNxQ==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1vl9hP-000L4H-6G; Wed, 28 Jan 2026 17:51:27 +0000 Date: Wed, 28 Jan 2026 09:51:20 -0800 From: Breno Leitao To: Andrii Nakryiko Cc: Oleg Nesterov , Masami Hiramatsu , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kernel-team@meta.com, stable@vger.kernel.org Subject: Re: [PATCH] uprobes: fix incorrect lockdep condition in filter_chain() Message-ID: References: <20260128-uprobe_rcu-v1-1-d41316763799@debian.org> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Debian-User: leitao On Wed, Jan 28, 2026 at 09:23:45AM -0800, Andrii Nakryiko wrote: > On Wed, Jan 28, 2026 at 5:51 AM Oleg Nesterov wrote: > > > > On 01/28, Breno Leitao wrote: > > > > > > The list_for_each_entry_rcu() in filter_chain() uses > > > rcu_read_lock_trace_held() as the lockdep condition, but the function > > > holds consumer_rwsem, not the RCU trace lock. > > > > > > This gives me the following output when running with some locking debug > > > option enabled: > > > > > > kernel/events/uprobes.c:1141 RCU-list traversed in non-reader section!! > > > filter_chain > > > register_for_each_vma > > > uprobe_unregister_nosync > > > __probe_event_disable > > > > > > Remove the incorrect lockdep condition since the rwsem provides > > > sufficient protection for the list traversal. > > > > I hope Andrii will recheck, but looks obviously correct to me. > > yeah, I did, and it also looks obviously correct to me, I didn't need > to use rcu flavor there in the first place, I think. > > Acked-by: Andrii Nakryiko > > > > > > Fixes: 87195a1ee332a ("uprobes: switch to RCU Tasks Trace flavor for better performance") > > > > This commit just change the __list_check_rcu() condition... > > > > Perhaps > > Fixes: cc01bd044e6a ("uprobes: travers uprobe's consumer list locklessly under SRCU protection") > > > > yep, this one is the earliest change adding unnecessary rcu flavor of > list_for_each_entry Ack. I will respin with the correct "fixes" tag. --breno