From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 14A77153801 for ; Fri, 5 Jul 2024 13:47:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187253; cv=none; b=chlYRVOSZLVSmX5yA1LB15ZzTORDnIXPIRB+sgar9fcFXLr5jfNPLxMSa+ku2hYHhJRH2hB3bxguJ9mWD+JU4W6hSOf9SHLW78rS1AUUmjrqBl12vHQDWXzQpMw6ufuP1sOP92b+YZFYkPAz1g/VuVUtiGUWXUbn0sSs2L0P0n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187253; c=relaxed/simple; bh=xa0QBNikgC7oSnwAzlWD+Bj67Z/v1rDwV3mn8vBd6DM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=leZ5TvUqeokUqrnaYzmcDGwmNmaiFnIIUTH8tw3mUd33b9LV+hzRTSPoC6anQEuNatr6ae9Vvvngpu7Q71p1NxthB/TnvgPVoaAjKfDHZAN3NZahGJ+J6j7xzTtezX9uebOHK61wfICs0twFAxiGOWHucxSXh/aKSWKBS8Ul/Wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=vSgcTOs6; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vSgcTOs6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ql04o+pRjIELqm3F5uVbMl5dukU0RLXAZXKk30yfue4=; b=vSgcTOs6Teb//fUGwvDyk8qqhT V+W5KtWWDtScDBk2SeCv4HHJILf+y61Yk8jp5ruGL1SqXtV7fNI1h/dUPHrzgKZMrTWX5ufDfq1oZ vx42IlvJb+ca+BSN5B0csIQtXskmHeHAWqZf6/JKuK68HGuCif2C+mCum5nngV6ZhUH64W1G1ShT/ yq8XG4w75+kPf1jZKloegnVWTFFqIjrq+DfNY9uuKsvF4AZ21fzKhTfi+YiGcAlqEs37INCwujLD8 YuHXi055Hly0Ax2kxCECWwMPcyNFRBk0pWc0huDzgwGWdZgMFKlR1XRJvU5CMzXcA4Ns1XIZ6Eyrd 4EJ00C9Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPjHf-0000000G6uO-1Eh8; Fri, 05 Jul 2024 13:47:31 +0000 Date: Fri, 5 Jul 2024 06:47:31 -0700 From: Christoph Hellwig To: Chuck Lever III Cc: David Wysochanski , Dave Wysochanski , Linux NFS Mailing List , Christoph Hellwig Subject: Re: BUG in nfs_read_folio() when tracing is enabled Message-ID: References: Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Fri, Jul 05, 2024 at 01:45:11PM +0000, Chuck Lever III wrote: > So Dave, I haven't tested the patch you posted a couple > days ago, because there hasn't been a clear answer about > whether nfs_read_folio() needs to protect itself against > the ->mapping changing, in which case, that's probably > a better fix. ->read_folio is called with the folio locked and only unlocks it on I/O completion, so it doesn't really need any protection. So the patch to simply move the trace point to before unlocking the folio should fix the issue. Alternatively we could just use the mapping from the inode variable and pass it in.