From: Namjae Jeon namjae.jeon@samsung.com
mainline inclusion from mainline-5.15-rc1 commit 522dcc76269fcc27a3a0128ca7699270fae61b60 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/522dcc76269f
-------------------------------
Never return 1 on failure.
Reviewed-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Namjae Jeon namjae.jeon@samsung.com Signed-off-by: Steve French stfrench@microsoft.com Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifsd/auth.c b/fs/cifsd/auth.c index a89de24aa576..7e56966f87d4 100644 --- a/fs/cifsd/auth.c +++ b/fs/cifsd/auth.c @@ -1144,7 +1144,7 @@ static int ksmbd_get_encryption_key(struct ksmbd_conn *conn, __u64 ses_id,
sess = ksmbd_session_lookup(conn, ses_id); if (!sess) - return 1; + return -EINVAL;
ses_enc_key = enc ? sess->smb3encryptionkey : sess->smb3decryptionkey;