Commit 7a3ecddc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag '5.18-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd

Pull ksmbd updates from Steve French:

 - three cleanup fixes

 - shorten module load warning

 - two documentation fixes

* tag '5.18-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: replace usage of found with dedicated list iterator variable
  ksmbd: Remove a redundant zeroing of memory
  MAINTAINERS: ksmbd: switch Sergey to reviewer
  ksmbd: shorten experimental warning on loading the module
  ksmbd: use netif_is_bridge_port
  Documentation: ksmbd: update Feature Status table
parents 9a005bea edf5f054
...@@ -82,10 +82,10 @@ Signing Update Supported. ...@@ -82,10 +82,10 @@ Signing Update Supported.
Pre-authentication integrity Supported. Pre-authentication integrity Supported.
SMB3 encryption(CCM, GCM) Supported. (CCM and GCM128 supported, GCM256 in SMB3 encryption(CCM, GCM) Supported. (CCM and GCM128 supported, GCM256 in
progress) progress)
SMB direct(RDMA) Partially Supported. SMB3 Multi-channel is SMB direct(RDMA) Supported.
required to connect to Windows client.
SMB3 Multi-channel Partially Supported. Planned to implement SMB3 Multi-channel Partially Supported. Planned to implement
replay/retry mechanisms for future. replay/retry mechanisms for future.
Receive Side Scaling mode Supported.
SMB3.1.1 POSIX extension Supported. SMB3.1.1 POSIX extension Supported.
ACLs Partially Supported. only DACLs available, SACLs ACLs Partially Supported. only DACLs available, SACLs
(auditing) is planned for the future. For (auditing) is planned for the future. For
......
...@@ -10668,9 +10668,9 @@ F: tools/testing/selftests/ ...@@ -10668,9 +10668,9 @@ F: tools/testing/selftests/
KERNEL SMB3 SERVER (KSMBD) KERNEL SMB3 SERVER (KSMBD)
M: Namjae Jeon <linkinjeon@kernel.org> M: Namjae Jeon <linkinjeon@kernel.org>
M: Sergey Senozhatsky <senozhatsky@chromium.org>
M: Steve French <sfrench@samba.org> M: Steve French <sfrench@samba.org>
M: Hyunchul Lee <hyc.lee@gmail.com> M: Hyunchul Lee <hyc.lee@gmail.com>
R: Sergey Senozhatsky <senozhatsky@chromium.org>
L: linux-cifs@vger.kernel.org L: linux-cifs@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.samba.org/ksmbd.git T: git git://git.samba.org/ksmbd.git
......
...@@ -585,7 +585,7 @@ static int __init ksmbd_server_init(void) ...@@ -585,7 +585,7 @@ static int __init ksmbd_server_init(void)
if (ret) if (ret)
goto err_crypto_destroy; goto err_crypto_destroy;
pr_warn_once("The ksmbd server is experimental, use at your own risk.\n"); pr_warn_once("The ksmbd server is experimental\n");
return 0; return 0;
......
...@@ -6607,8 +6607,7 @@ int smb2_cancel(struct ksmbd_work *work) ...@@ -6607,8 +6607,7 @@ int smb2_cancel(struct ksmbd_work *work)
struct ksmbd_conn *conn = work->conn; struct ksmbd_conn *conn = work->conn;
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf); struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
struct smb2_hdr *chdr; struct smb2_hdr *chdr;
struct ksmbd_work *cancel_work = NULL; struct ksmbd_work *cancel_work = NULL, *iter;
int canceled = 0;
struct list_head *command_list; struct list_head *command_list;
ksmbd_debug(SMB, "smb2 cancel called on mid %llu, async flags 0x%x\n", ksmbd_debug(SMB, "smb2 cancel called on mid %llu, async flags 0x%x\n",
...@@ -6618,11 +6617,11 @@ int smb2_cancel(struct ksmbd_work *work) ...@@ -6618,11 +6617,11 @@ int smb2_cancel(struct ksmbd_work *work)
command_list = &conn->async_requests; command_list = &conn->async_requests;
spin_lock(&conn->request_lock); spin_lock(&conn->request_lock);
list_for_each_entry(cancel_work, command_list, list_for_each_entry(iter, command_list,
async_request_entry) { async_request_entry) {
chdr = smb2_get_msg(cancel_work->request_buf); chdr = smb2_get_msg(iter->request_buf);
if (cancel_work->async_id != if (iter->async_id !=
le64_to_cpu(hdr->Id.AsyncId)) le64_to_cpu(hdr->Id.AsyncId))
continue; continue;
...@@ -6630,7 +6629,7 @@ int smb2_cancel(struct ksmbd_work *work) ...@@ -6630,7 +6629,7 @@ int smb2_cancel(struct ksmbd_work *work)
"smb2 with AsyncId %llu cancelled command = 0x%x\n", "smb2 with AsyncId %llu cancelled command = 0x%x\n",
le64_to_cpu(hdr->Id.AsyncId), le64_to_cpu(hdr->Id.AsyncId),
le16_to_cpu(chdr->Command)); le16_to_cpu(chdr->Command));
canceled = 1; cancel_work = iter;
break; break;
} }
spin_unlock(&conn->request_lock); spin_unlock(&conn->request_lock);
...@@ -6638,24 +6637,24 @@ int smb2_cancel(struct ksmbd_work *work) ...@@ -6638,24 +6637,24 @@ int smb2_cancel(struct ksmbd_work *work)
command_list = &conn->requests; command_list = &conn->requests;
spin_lock(&conn->request_lock); spin_lock(&conn->request_lock);
list_for_each_entry(cancel_work, command_list, request_entry) { list_for_each_entry(iter, command_list, request_entry) {
chdr = smb2_get_msg(cancel_work->request_buf); chdr = smb2_get_msg(iter->request_buf);
if (chdr->MessageId != hdr->MessageId || if (chdr->MessageId != hdr->MessageId ||
cancel_work == work) iter == work)
continue; continue;
ksmbd_debug(SMB, ksmbd_debug(SMB,
"smb2 with mid %llu cancelled command = 0x%x\n", "smb2 with mid %llu cancelled command = 0x%x\n",
le64_to_cpu(hdr->MessageId), le64_to_cpu(hdr->MessageId),
le16_to_cpu(chdr->Command)); le16_to_cpu(chdr->Command));
canceled = 1; cancel_work = iter;
break; break;
} }
spin_unlock(&conn->request_lock); spin_unlock(&conn->request_lock);
} }
if (canceled) { if (cancel_work) {
cancel_work->state = KSMBD_WORK_CANCELLED; cancel_work->state = KSMBD_WORK_CANCELLED;
if (cancel_work->cancel_fn) if (cancel_work->cancel_fn)
cancel_work->cancel_fn(cancel_work->cancel_argv); cancel_work->cancel_fn(cancel_work->cancel_argv);
...@@ -8484,7 +8483,7 @@ static void fill_transform_hdr(void *tr_buf, char *old_buf, __le16 cipher_type) ...@@ -8484,7 +8483,7 @@ static void fill_transform_hdr(void *tr_buf, char *old_buf, __le16 cipher_type)
struct smb2_hdr *hdr = smb2_get_msg(old_buf); struct smb2_hdr *hdr = smb2_get_msg(old_buf);
unsigned int orig_len = get_rfc1002_len(old_buf); unsigned int orig_len = get_rfc1002_len(old_buf);
memset(tr_buf, 0, sizeof(struct smb2_transform_hdr) + 4); /* tr_buf must be cleared by the caller */
tr_hdr->ProtocolId = SMB2_TRANSFORM_PROTO_NUM; tr_hdr->ProtocolId = SMB2_TRANSFORM_PROTO_NUM;
tr_hdr->OriginalMessageSize = cpu_to_le32(orig_len); tr_hdr->OriginalMessageSize = cpu_to_le32(orig_len);
tr_hdr->Flags = cpu_to_le16(TRANSFORM_FLAG_ENCRYPTED); tr_hdr->Flags = cpu_to_le16(TRANSFORM_FLAG_ENCRYPTED);
......
...@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event, ...@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,
switch (event) { switch (event) {
case NETDEV_UP: case NETDEV_UP:
if (netdev->priv_flags & IFF_BRIDGE_PORT) if (netif_is_bridge_port(netdev))
return NOTIFY_OK; return NOTIFY_OK;
list_for_each_entry(iface, &iface_list, entry) { list_for_each_entry(iface, &iface_list, entry) {
...@@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz) ...@@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz)
rtnl_lock(); rtnl_lock();
for_each_netdev(&init_net, netdev) { for_each_netdev(&init_net, netdev) {
if (netdev->priv_flags & IFF_BRIDGE_PORT) if (netif_is_bridge_port(netdev))
continue; continue;
if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL))) if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL)))
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment