]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD/blocklayout: Fix minlength check in proc_layoutget
authorSergey Bashirov <sergeybashirov@gmail.com>
Fri, 3 Oct 2025 09:11:03 +0000 (12:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:30 +0000 (13:09 +0100)
commit01f1e3015a7744f0d4ff30aa8d9250ef4e516b5f
tree159b8fca6586f8a0e5f1b94337a170a64c0fdbd8
parentdbeddfaaa3c03d601440c38557f31d4f470fc8ef
NFSD/blocklayout: Fix minlength check in proc_layoutget

[ Upstream commit 3524b021b0ec620a76c89aee78e9d4b4130fb711 ]

The extent returned by the file system may have a smaller offset than
the segment offset requested by the client. In this case, the minimum
segment length must be checked against the requested range. Otherwise,
the client may not be able to continue the read/write operation.

Fixes: 8650b8a05850 ("nfsd: pNFS block layout driver")
Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/blocklayout.c