]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 16 Nov 2025 23:20:11 +0000 (18:20 -0500)
commit3524b021b0ec620a76c89aee78e9d4b4130fb711
tree7799b8d0a687bf54ebd488edc2b3b08dee1cad33
parent566a414558aec1ab263ab8709fa783dfa2e34325
NFSD/blocklayout: Fix minlength check in proc_layoutget

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>
fs/nfsd/blocklayout.c