Files
linux/fs/nfs
Christoph Hellwig 387e6e9d11 nfs: pass explicit offset/count to trace events
[ Upstream commit fada32ed6d ]

nfs_folio_length is unsafe to use without having the folio locked and a
check for a NULL ->f_mapping that protects against truncations and can
lead to kernel crashes.  E.g. when running xfstests generic/065 with
all nfs trace points enabled.

Follow the model of the XFS trace points and pass in an explіcit offset
and length.  This has the additional benefit that these values can
be more accurate as some of the users touch partial folio ranges.

Fixes: eb5654b3b8 ("NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio()")
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 09:00:05 +02:00
..
2024-05-20 11:37:15 -04:00
2023-03-06 09:57:12 +01:00
2024-03-09 09:14:51 -05:00
2023-03-06 09:57:12 +01:00
2023-10-09 16:24:20 +02:00
2023-08-19 10:26:29 -04:00