]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pNFS: Fix disk addr range check in block/scsi layout
authorSergey Bashirov <sergeybashirov@gmail.com>
Wed, 2 Jul 2025 13:32:21 +0000 (16:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:32 +0000 (18:41 +0200)
commitfc75591787a6c580847fcea05cfbe044b67a838a
tree1ad7abef4a27f5be77e7ceb4ba04593c0944b3d5
parent913b15bb7f743afe705dcb519eccee91588c47ce
pNFS: Fix disk addr range check in block/scsi layout

[ Upstream commit 7db6e66663681abda54f81d5916db3a3b8b1a13d ]

At the end of the isect translation, disc_addr represents the physical
disk offset. Thus, end calculated from disk_addr is also a physical disk
offset. Therefore, range checking should be done using map->disk_offset,
not map->start.

Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250702133226.212537-1-sergeybashirov@gmail.com
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/blocklayout/blocklayout.c