aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorZhangGuoDong <zhangguodong@kylinos.cn>2025-12-28 22:51:01 +0800
committerSteve French <stfrench@microsoft.com>2025-12-29 17:39:57 -0600
commit7c28f8eef5ac5312794d8a52918076dcd787e53b (patch)
tree8bf1c2b9b3f8766cb34bba37b0e95b3eb8b24e8c /fs
parent0c56693b06a68476ba113db6347e7897475f9e4c (diff)
smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe()
When ksmbd_iov_pin_rsp() fails, we should call ksmbd_session_rpc_close(). Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/server/smb2pdu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index a607e072a370..8a7c48adb87e 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -2281,7 +2281,7 @@ static noinline int create_smb2_pipe(struct ksmbd_work *work)
{
struct smb2_create_rsp *rsp;
struct smb2_create_req *req;
- int id;
+ int id = -1;
int err;
char *name;
@@ -2338,6 +2338,9 @@ out:
break;
}
+ if (id >= 0)
+ ksmbd_session_rpc_close(work->sess, id);
+
if (!IS_ERR(name))
kfree(name);