From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from neil.brown.name (neil.brown.name [103.29.64.221]) (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 BB2462797BE for ; Fri, 4 Jul 2025 07:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.29.64.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751613861; cv=none; b=Ht3oC++EvQStLiHqlsG5sX9dm9Ic4BYcrmen++qGKRb8zvPIRUDG51RhzoUQimyeEcMeU/JAyV1swMmHQZ1Ft7dAivgPnI1t7MNM0kfSuQO2iCi4wbLnvIRzC9ieuoDSIenl66WYUL30z+kLWBxG/NOYZXqFTE6yLBORA4GMA5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751613861; c=relaxed/simple; bh=FTIF5pSuzlgLWBrqBSoMlsp1ZZTRtc7yKrVCAa742hc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GzQc9CaGr4kgecKX8UyDYIWiS9NSr9jK3bXXHiIxkID3l2pXkEkKwjS0GyZd2KiZ1I+0DG5FT5k9/hiCrlzP+016u9QzNtzdaFoqnhSFXCPGR9pLT040+h6DX7/r35v91IbaYcwYNRzhdLv7XHLlwy5YAIV3BEkFJinR/uXeHbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=brown.name; spf=pass smtp.mailfrom=neil.brown.name; arc=none smtp.client-ip=103.29.64.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=brown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=neil.brown.name Received: from 196.186.233.220.static.exetel.com.au ([220.233.186.196] helo=home.neil.brown.name) by neil.brown.name with esmtp (Exim 4.95) (envelope-from ) id 1uXalr-001jkG-N7; Fri, 04 Jul 2025 07:23:43 +0000 From: NeilBrown To: Chuck Lever , Jeff Layton Cc: linux-nfs@vger.kernel.org, Olga Kornievskaia , Dai Ngo , Tom Talpey , Li Lingfeng Subject: [PATCH 0/2] nfsd: provide locking for v4_end_grace Date: Fri, 4 Jul 2025 17:20:16 +1000 Message-ID: <20250704072332.3278129-1-neil@brown.name> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Writing to v4_end_grace can race with server shutdown and result in UAF. The first patch fixes the problem in a way that is suitable for backport. The second patch improves is slightly (in my opinion) but in a way that cannot be backported very far. Note that I've used a different Closes: link to the one Chuck suggested in a recent email. NeilBrown [PATCH 1/2] nfsd: provide locking for v4_end_grace [PATCH 2/2] nfsd: discard client_tracking_active and instead disable