mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
Merge tag 'v6.18-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French: - Multichannel reconnect channel selection fix - Fix for smbdirect (RDMA) disconnect bug - Fix for incorrect username length check - Fix memory leak in mount parm processing * tag 'v6.18-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: let smbd_disconnect_rdma_connection() turn CREATED into DISCONNECTED smb: fix invalid username check in smb3_fs_context_parse_param() cifs: client: fix memory leak in smb3_fs_context_parse_param smb: client: fix cifs_pick_channel when channel needs reconnect
This commit is contained in:
@@ -1435,12 +1435,14 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
|
||||
cifs_errorf(fc, "Unknown error parsing devname\n");
|
||||
goto cifs_parse_mount_err;
|
||||
}
|
||||
kfree(ctx->source);
|
||||
ctx->source = smb3_fs_context_fullpath(ctx, '/');
|
||||
if (IS_ERR(ctx->source)) {
|
||||
ctx->source = NULL;
|
||||
cifs_errorf(fc, "OOM when copying UNC string\n");
|
||||
goto cifs_parse_mount_err;
|
||||
}
|
||||
kfree(fc->source);
|
||||
fc->source = kstrdup(ctx->source, GFP_KERNEL);
|
||||
if (fc->source == NULL) {
|
||||
cifs_errorf(fc, "OOM when copying UNC string\n");
|
||||
@@ -1468,7 +1470,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
|
||||
break;
|
||||
}
|
||||
|
||||
if (strnlen(param->string, CIFS_MAX_USERNAME_LEN) >
|
||||
if (strnlen(param->string, CIFS_MAX_USERNAME_LEN) ==
|
||||
CIFS_MAX_USERNAME_LEN) {
|
||||
pr_warn("username too long\n");
|
||||
goto cifs_parse_mount_err;
|
||||
|
||||
@@ -290,6 +290,9 @@ static void smbd_disconnect_rdma_connection(struct smbdirect_socket *sc)
|
||||
break;
|
||||
|
||||
case SMBDIRECT_SOCKET_CREATED:
|
||||
sc->status = SMBDIRECT_SOCKET_DISCONNECTED;
|
||||
break;
|
||||
|
||||
case SMBDIRECT_SOCKET_CONNECTED:
|
||||
sc->status = SMBDIRECT_SOCKET_ERROR;
|
||||
break;
|
||||
|
||||
@@ -830,7 +830,7 @@ struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
|
||||
if (!server || server->terminate)
|
||||
continue;
|
||||
|
||||
if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
|
||||
if (CIFS_CHAN_NEEDS_RECONNECT(ses, cur))
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user