]> www.infradead.org Git - users/jedix/linux-maple.git/commit
filemap: filemap_read() should check that the offset is positive or zero
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 13 Sep 2024 20:04:18 +0000 (16:04 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 2 Oct 2024 05:52:12 +0000 (07:52 +0200)
commit9d926f10b7ff4300a5dc36ecc52d061911d027d8
treeebad93161c3946f29a55054347da3091ce60a667
parent2b2b1a20db83cf0c3892dac2a6b2a7292c9607d8
filemap: filemap_read() should check that the offset is positive or zero

We do check that the read offset is less than the filesystem limit,
however for good measure we should also check that it is positive or
zero, and return EINVAL if that is not the case.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Link: https://lore.kernel.org/r/482ee0b8a30b62324adb9f7c551a99926f037393.1726257832.git.trond.myklebust@hammerspace.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
mm/filemap.c