From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 818EE8834 for ; Sun, 19 Apr 2026 10:01:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776592895; cv=none; b=C1sDQXsXbEgsb79y/DmEBpmWeK9aoEQmudQVrfoHCPtK+UOlQi5sbxXmjb2VxUOMW+Odj2/t48Duhl3RiX+8tyInA/2ICVzusLGOfQ9S9NuboI5mbl6qWxRmtJsqVVjqIGRsj3ikmS7yR+tM1hcZ4VINMyL2a7bpz2srpOOUSpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776592895; c=relaxed/simple; bh=bWOzYnwtpJPFfcCzAqzyrLcOkcqhlEuyq58SsmiOSKs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Woh5EPmhubDQBo+uIUxBoQ9h3N0HLRKsDNAyteQjg5UeoJDVWlhsTmVya4uDan0vSQQ5U4sClRzRYDq6WHQjPHmUCrI8u75FkTcIHbo7We3eNrAaan/GD0Z551E5sBfna0gpxK1MmnlP2c+Zr58Cd1VkyMvLTQoDGQYyjkO0nQw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pCuQIAIS; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pCuQIAIS" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-358e3cc5e7eso1193485a91.0 for ; Sun, 19 Apr 2026 03:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776592894; x=1777197694; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QNm0h4QX/EhfLoWOBnAijFBFXAhdw8Hwyw3K3XZpPes=; b=pCuQIAIS9/gliZAj3BByBvloABmdD3Nc6GnKAnrj3miuK0381WxXFkauLuZUoRBdmS dbn0OtCOUWq3T7vqHxAv2QouSayGcqOGho81+WKddN2ftYtTZ/HExqJch1wQIdhu35f1 7uEwwoW3zqmkC4OgODmfv0WA9AptE6STh13J0YJ34NWOx3WuEKdKBu7sMxIHSowBbxdT VF0JQMKSPmVRMqZ971dS3ZduYve9jrOr3WaZvn1EmzRPr6xTBeVNgEWdai7M7mgdJxSW WQMISlg2R0xt6ZKXVebHJ8ATP1WKd8z9s5levH3O3BkFY1Hv54UIX38PV+KCohfKyZnc /ucw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776592894; x=1777197694; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QNm0h4QX/EhfLoWOBnAijFBFXAhdw8Hwyw3K3XZpPes=; b=qI6sjz0uSt5vorGufIbtUO4y2KB8PUQnX+MfzzJvAvbPkSluZXKYkxTFJwRpmMDv/b 1fdOv01Tbi78iyQkaa06OJtAKqyhhF5ORReP5CRRKcDcwoHBQjKx1f3AniYFY23RVLvf d+slLsvdOZSDHjBnimb9JmXNFqE2otSrvyQAbDQpFQmVVQIXRkHF/1XuytVL2KehyLDH 1KLF7DOX89BxiQsrL0AUW1xxRgiRK6HePqxAqeV3Uo+nU9/bzwVsbxHrfxLL7gY7thdB GHKNdP9c8PUKWPxuvYm+8sEaXI57Moxo887NqIDfKxgvuYRLMJ1yiRy0cbmJ3/Wgrp4h /FUA== X-Forwarded-Encrypted: i=1; AFNElJ8ck/3LOhWGpQ6e3ASR8AuPBCE8CNp0tOMid6uD+ZlhhVXeiKyNn/IRCbwYPHiZMbN/69ubWBL0ij57N4o=@vger.kernel.org X-Gm-Message-State: AOJu0YxJUH7hj87p7Z1MngPm0YGRMeJIhmwaszdowh1sB3HPy8DF71As qSw2Q5OkIxocwJgB8PP27vi8DQqAJTFOnbkQQsfcQ+1FCYqRSPNWZ0Yt X-Gm-Gg: AeBDieu9HtakHtggxAt2wPJXwMqRwRY5+3VXbyPghDSWM3jvLWM3PyIOwrwT+HU32I2 F2KquwlrFYsv7t2hDk/geMRLQx0LvVEN0u5u4yxRb7altxFXtM+E1xdcPSS3CHu4clqHm5+I3/G 57vrw1Tz6fwgnk0cDyt3RmR3YmQKPX9WjzjwN4j9mHh45Lq1EyZeO2G1NWbqdeWnGlq3L6NMPb+ PLaEckuNUHre8F6Am53DTRFiXsdyenij/yn38Mk0yF2p6dYjvTG7UQueCrGykRsBLjyNCVA6U6n FK6yMVQAsrkknb3JHJYS73YBrkHWFOk2AC5pM5wYYn3jTuDtbQ55XabyPafROVEUK6li+v3P89w hpIyivqFoV8v/HiI52QtEFBFbYUl2frkPLkTikk3IjJmSPM6FBx77UQyfs08PZ7UsGCUO6L4dTu IDoEolQU7Za0kOWI7RiF8drBRrEdfrs6RmgmxjtOuiWiAuD93cnXfllH79p4ENh2EgKiWgVAj+M 6rr12JSRcoJQzH3h03dKhm34N1EKQ== X-Received: by 2002:a17:90a:d0f:b0:361:45df:114 with SMTP id 98e67ed59e1d1-36145df0462mr4986723a91.19.1776592893758; Sun, 19 Apr 2026 03:01:33 -0700 (PDT) Received: from localhost.localdomain (1-160-233-238.dynamic-ip.hinet.net. [1.160.233.238]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-361410bafa9sm7114296a91.15.2026.04.19.03.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2026 03:01:33 -0700 (PDT) From: Sean Chang To: Benjamin Coddington Cc: Jeff Layton , trondmy@kernel.org, anna@kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Chang Subject: [PATCH v2 0/2] NFS: fix RCU and tracing pointer safety Date: Sun, 19 Apr 2026 18:01:26 +0800 Message-ID: <20260419100128.20546-1-seanwascoding@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series addresses two Sparse static analysis warnings in the NFS client related to RCU safety and pointer attributes. The first patch resolves a "dereferencing noderef expression" warning within the nfs_page_class tracepoint by removing a redundant __private attribute that was causing Sparse to complain during trace-buffer assignments. The second patch fixes an RCU-unsafe dereference in nfs_compare_super_address. It wraps cl_xprt access with rcu_read_lock() and rcu_dereference(). Following reviewer feedback, the RCU critical section is kept minimal, covering only the transport and network namespace checks. An additional check for XPRT_CONNECTED is included to ensure the transport is logically active during the comparison. v2: - Patch 1: Instead of changing the 'req' field type to unsigned long (as in v1), simply remove the redundant __private attribute. This resolves the Sparse warning while preserving the original pointer type. - Patch 2: Reduced RCU read-side critical section scope to cover only the necessary transport/net-ns checks, as suggested by reviewers. Sean Chang (2): NFS: remove redundant __private attribute from nfs_page_class NFS: Fix RCU dereference of cl_xprt in nfs_compare_super_address fs/nfs/nfstrace.h | 2 +- fs/nfs/super.c | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) -- 2.43.0