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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,10 +82,10 @@ Signing Update Supported.
Pre-authentication integrity   Supported.
SMB3 encryption(CCM, GCM)      Supported. (CCM and GCM128 supported, GCM256 in
                               progress)
SMB direct(RDMA)               Partially Supported. SMB3 Multi-channel is
                               required to connect to Windows client.
SMB direct(RDMA)               Supported.
SMB3 Multi-channel             Partially Supported. Planned to implement
                               replay/retry mechanisms for future.
Receive Side Scaling mode      Supported.
SMB3.1.1 POSIX extension       Supported.
ACLs                           Partially Supported. only DACLs available, SACLs
                               (auditing) is planned for the future. For
+1 −1
Original line number Diff line number Diff line
@@ -10668,9 +10668,9 @@ F: tools/testing/selftests/
KERNEL SMB3 SERVER (KSMBD)
M:	Namjae Jeon <linkinjeon@kernel.org>
M:	Sergey Senozhatsky <senozhatsky@chromium.org>
M:	Steve French <sfrench@samba.org>
M:	Hyunchul Lee <hyc.lee@gmail.com>
R:	Sergey Senozhatsky <senozhatsky@chromium.org>
L:	linux-cifs@vger.kernel.org
S:	Maintained
T:	git git://git.samba.org/ksmbd.git
+1 −1
Original line number Diff line number Diff line
@@ -585,7 +585,7 @@ static int __init ksmbd_server_init(void)
	if (ret)
		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;

+11 −12
Original line number Diff line number Diff line
@@ -6607,8 +6607,7 @@ int smb2_cancel(struct ksmbd_work *work)
	struct ksmbd_conn *conn = work->conn;
	struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
	struct smb2_hdr *chdr;
	struct ksmbd_work *cancel_work = NULL;
	int canceled = 0;
	struct ksmbd_work *cancel_work = NULL, *iter;
	struct list_head *command_list;

	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)
		command_list = &conn->async_requests;

		spin_lock(&conn->request_lock);
		list_for_each_entry(cancel_work, command_list,
		list_for_each_entry(iter, command_list,
				    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))
				continue;

@@ -6630,7 +6629,7 @@ int smb2_cancel(struct ksmbd_work *work)
				    "smb2 with AsyncId %llu cancelled command = 0x%x\n",
				    le64_to_cpu(hdr->Id.AsyncId),
				    le16_to_cpu(chdr->Command));
			canceled = 1;
			cancel_work = iter;
			break;
		}
		spin_unlock(&conn->request_lock);
@@ -6638,24 +6637,24 @@ int smb2_cancel(struct ksmbd_work *work)
		command_list = &conn->requests;

		spin_lock(&conn->request_lock);
		list_for_each_entry(cancel_work, command_list, request_entry) {
			chdr = smb2_get_msg(cancel_work->request_buf);
		list_for_each_entry(iter, command_list, request_entry) {
			chdr = smb2_get_msg(iter->request_buf);

			if (chdr->MessageId != hdr->MessageId ||
			    cancel_work == work)
			    iter == work)
				continue;

			ksmbd_debug(SMB,
				    "smb2 with mid %llu cancelled command = 0x%x\n",
				    le64_to_cpu(hdr->MessageId),
				    le16_to_cpu(chdr->Command));
			canceled = 1;
			cancel_work = iter;
			break;
		}
		spin_unlock(&conn->request_lock);
	}

	if (canceled) {
	if (cancel_work) {
		cancel_work->state = KSMBD_WORK_CANCELLED;
		if (cancel_work->cancel_fn)
			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)
	struct smb2_hdr *hdr = smb2_get_msg(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->OriginalMessageSize = cpu_to_le32(orig_len);
	tr_hdr->Flags = cpu_to_le16(TRANSFORM_FLAG_ENCRYPTED);
+2 −2
Original line number Diff line number Diff line
@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,

	switch (event) {
	case NETDEV_UP:
		if (netdev->priv_flags & IFF_BRIDGE_PORT)
		if (netif_is_bridge_port(netdev))
			return NOTIFY_OK;

		list_for_each_entry(iface, &iface_list, entry) {
@@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz)

		rtnl_lock();
		for_each_netdev(&init_net, netdev) {
			if (netdev->priv_flags & IFF_BRIDGE_PORT)
			if (netif_is_bridge_port(netdev))
				continue;
			if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL)))
				return -ENOMEM;