Skip to content

Commit 3296c30

Browse files
ZhangGuoDongsmfrench
authored andcommitted
smb/server: fix refcount leak in parse_durable_handle_context()
When the command is a replay operation and -ENOEXEC is returned, the refcount of ksmbd_file must be released. 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>
1 parent 7c28f8e commit 3296c30

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/smb/server/smb2pdu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,6 +2812,7 @@ static int parse_durable_handle_context(struct ksmbd_work *work,
28122812
SMB2_CLIENT_GUID_SIZE)) {
28132813
if (!(req->hdr.Flags & SMB2_FLAGS_REPLAY_OPERATION)) {
28142814
err = -ENOEXEC;
2815+
ksmbd_put_durable_fd(dh_info->fp);
28152816
goto out;
28162817
}
28172818

0 commit comments

Comments
 (0)