]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: fix read on the uninitialized send_ctx
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 7 Jul 2021 05:56:44 +0000 (14:56 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Thu, 8 Jul 2021 06:46:11 +0000 (15:46 +0900)
commitd65fdb7c2a78b0692dec607ffdd05b79859b1b7b
tree994f7c8dbb41f9605040c74e6d81620fa6cb57c5
parentbe0b56b53afb01790ed9697534796dba7b60cda0
ksmbd: fix read on the uninitialized send_ctx

If st->status is not SMB_DIRECT_CS_CONNECTED, It will jump done label
and accessing the uninitialized send_ctxi by smb_direct_flush_send_list
will cause kernel oops. This patch just return -ENOTCONN to avoid it.

Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/transport_rdma.c