[ Sasha's backport helper bot ]
Hi,
Summary of potential issues: ⚠️ Found matching upstream commit but patch is missing proper reference to it
Found matching upstream commit: 605b249ea96770ac4fac4b8510a99e0f8442be5e
Status in newer kernel trees: 6.13.y | Present (different SHA1: 4a133bda03ec) 6.12.y | Present (different SHA1: 3d48d46299be) 6.6.y | Present (different SHA1: 3fbc1e703fba) 6.1.y | Present (different SHA1: d4942cd6ac83)
Note: The patch differs from the upstream commit: --- 1: 605b249ea9677 ! 1: b3ee73e91ec7f smb: client: Fix match_session bug preventing session reuse @@ Commit message Reviewed-by: Enzo Matsumiya ematsumiya@suse.de Signed-off-by: Henrique Carvalho henrique.carvalho@suse.com Signed-off-by: Steve French stfrench@microsoft.com + (cherry picked from commit 605b249ea96770ac4fac4b8510a99e0f8442be5e)
- ## fs/smb/client/connect.c ## -@@ fs/smb/client/connect.c: static int match_session(struct cifs_ses *ses, - struct smb3_fs_context *ctx, - bool match_super) + ## fs/cifs/connect.c ## +@@ fs/cifs/connect.c: cifs_get_tcp_session(struct smb3_fs_context *ctx) + + static int match_session(struct cifs_ses *ses, struct smb3_fs_context *ctx) { - if (ctx->sectype != Unspecified && - ctx->sectype != ses->sectype) @@ fs/smb/client/connect.c: static int match_session(struct cifs_ses *ses, + struct TCP_Server_Info *server = ses->server; + enum securityEnum ctx_sec, ses_sec;
- if (!match_super && ctx->dfs_root_ses != ses->dfs_root_ses) - return 0; -@@ fs/smb/client/connect.c: static int match_session(struct cifs_ses *ses, - if (ses->chan_max < ctx->max_channels) - return 0; + /* + * If an existing session is limited to less channels than +@@ fs/cifs/connect.c: static int match_session(struct cifs_ses *ses, struct smb3_fs_context *ctx) + } + spin_unlock(&ses->chan_lock);
- switch (ses->sectype) { + ctx_sec = server->ops->select_sectype(server, ctx->sectype); @@ fs/smb/client/connect.c: static int match_session(struct cifs_ses *ses, + return 0; + + switch (ctx_sec) { -+ case IAKerb: case Kerberos: if (!uid_eq(ctx->cred_uid, ses->cred_uid)) return 0; ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.15.y | Success | Success |