]> git.baikalelectronics.ru Git - kernel.git/commit
cifsd: check return value of ksmbd_vfs_getcasexattr() correctly
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 31 May 2021 08:25:05 +0000 (17:25 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Tue, 1 Jun 2021 00:26:20 +0000 (09:26 +0900)
commit09d1214a05b80421c50a72bc3ccbd5e7a8fc2b01
tree0487242c917d5d85bf6183516e163119190319af
parent71e97cd62c472bb5c040b7c71584f0e38ba3ffe2
cifsd: check return value of ksmbd_vfs_getcasexattr() correctly

If ksmbd_vfs_getcasexattr() returns -ENOMEM, stream_buf is NULL,
it will cause null-ptr-deref when using it to copy memory. So we
need check the return value of ksmbd_vfs_getcasexattr() by comparing
with 0.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifsd/vfs.c