smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe()
Subsystems (2)
PATCH 1/1 smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe()
From: ZhangGuoDong <[email protected]>
When ksmbd_iov_pin_rsp() fails, we should call ksmbd_session_rpc_close().
Signed-off-by ZhangGuoDong <[email protected]>
Signed-off-by ChenXiaoSong <[email protected]>
--- fs/smb/server/smb2pdu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/smb/server/smb2pdu.c +4 -1
@@ -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 @@ static noinline int create_smb2_pipe(struct ksmbd_work *work)break ; } +if (id >=0 ) +ksmbd_session_rpc_close (work->sess, id); +if (!IS_ERR (name))kfree (name);
Signature · 1 line
2.43.0
Quoted 7 lines · On Sun, Dec 28, 2025 at 11:52 PM <[email protected]> wrote:
From: ZhangGuoDong <[email protected]>
When
ksmbd_iov_pin_rsp()fails, we should callksmbd_session_rpc_close().Signed-off-by ZhangGuoDong <[email protected]>Signed-off-by ChenXiaoSong <[email protected]>
Applied it to #ksmbd-for-next-next.
Thanks!