]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:23 +0000 (17:53 +0200)
commitdc97a8f60d21760daeec0ec867097073026f25a6
tree9c7e3e1cd458d04de2ae0c3891c4f8e9aa492bad
parent63b610956ae63d19fa46cb508dd977539712e9e4
ksmbd: use vfs_llseek instead of dereferencing NULL

commit d66f6f622dcd636a41622d52c5b23031393a10ca upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/vfs.c