* [PATCH] Reset TreeId to zero on SMB2 TREE_CONNECT
@ 2017-02-20 11:25 Jan-Marek Glogowski
[not found] ` <1487589958-20489-1-git-send-email-glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jan-Marek Glogowski @ 2017-02-20 11:25 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
Currently the cifs module breaks the CIFS specs on reconnect as
described in http://msdn.microsoft.com/en-us/library/cc246529.aspx:
"TreeId (4 bytes): Uniquely identifies the tree connect for the
command. This MUST be 0 for the SMB2 TREE_CONNECT Request."
Signed-off-by: Jan-Marek Glogowski <glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>
Reviewed-by: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
Tested-by: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
---
fs/cifs/smb2pdu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 8745722..bdd3292 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1104,6 +1104,10 @@ static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon)
return -EINVAL;
}
+ /* SMB2 TREE_CONNECT request must be called with TreeId == 0 */
+ if (tcon)
+ tcon->tid = 0;
+
rc = small_smb2_init(SMB2_TREE_CONNECT, tcon, (void **) &req);
if (rc) {
kfree(unc_path);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1487589958-20489-1-git-send-email-glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>]
* Re: [PATCH] Reset TreeId to zero on SMB2 TREE_CONNECT [not found] ` <1487589958-20489-1-git-send-email-glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org> @ 2017-03-23 18:17 ` Jan-Marek Glogowski [not found] ` <efd254dc-ecd6-5ea7-7850-b287c64071c2-iG8UcmBuX++ELgA04lAiVw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jan-Marek Glogowski @ 2017-03-23 18:17 UTC (permalink / raw) To: linux-cifs-u79uwXL29TY76Z2rM5mHXA Hi everyone, just replying to my own patch mail. The patch is now pending for a month. I saw other stuff picked up for linux-next and wondered, if it was missing something? The patch was developed with the help of Aurelien Aptel, originally in the "Fix SMB2_TREE_CONNECT requests with the wrong TreeId" thread starting 2017-02-10. There is a bug report with an attached trace and my debug scripts at https://bugzilla.samba.org/show_bug.cgi?id=12584 Best regards, Jan-Marek Glogowski ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <efd254dc-ecd6-5ea7-7850-b287c64071c2-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>]
* Re: [PATCH] Reset TreeId to zero on SMB2 TREE_CONNECT [not found] ` <efd254dc-ecd6-5ea7-7850-b287c64071c2-iG8UcmBuX++ELgA04lAiVw@public.gmane.org> @ 2017-03-24 4:30 ` Steve French 0 siblings, 0 replies; 3+ messages in thread From: Steve French @ 2017-03-24 4:30 UTC (permalink / raw) To: Jan-Marek Glogowski; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org I plan to merge this On Thu, Mar 23, 2017 at 1:17 PM, Jan-Marek Glogowski <glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org> wrote: > Hi everyone, > > just replying to my own patch mail. > > The patch is now pending for a month. I saw other stuff picked up for > linux-next and wondered, if it was missing something? > > The patch was developed with the help of Aurelien Aptel, originally in > the "Fix SMB2_TREE_CONNECT requests with the wrong TreeId" thread > starting 2017-02-10. > > There is a bug report with an attached trace and my debug scripts at > https://bugzilla.samba.org/show_bug.cgi?id=12584 > > Best regards, > > Jan-Marek Glogowski > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks, Steve ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-24 4:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 11:25 [PATCH] Reset TreeId to zero on SMB2 TREE_CONNECT Jan-Marek Glogowski
[not found] ` <1487589958-20489-1-git-send-email-glogow-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>
2017-03-23 18:17 ` Jan-Marek Glogowski
[not found] ` <efd254dc-ecd6-5ea7-7850-b287c64071c2-iG8UcmBuX++ELgA04lAiVw@public.gmane.org>
2017-03-24 4:30 ` Steve French
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox