]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: use vfs_llseek instead of dereferencing NULL
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 25 Jun 2022 11:01:08 +0000 (13:01 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 26 Jun 2022 00:52:49 +0000 (19:52 -0500)
commitd66f6f622dcd636a41622d52c5b23031393a10ca
treeb6b9a06e704c3cf8479dd464a6facc2d18995cf5
parent5678db6ab5b06b87cec4dce7d825fdaff03a4e51
ksmbd: use vfs_llseek instead of dereferencing NULL

By not checking whether llseek is NULL, this might jump to NULL. Also,
it doesn't check FMODE_LSEEK. Fix this by using vfs_llseek(), which
always does the right thing.

Fixes: 9be54045676d ("cifsd: add file operations")
Cc: stable@vger.kernel.org
Cc: linux-cifs@vger.kernel.org
Cc: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/vfs.c