Skip to content

Commit 7a3ecdd

Browse files
committed
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
2 parents 9a005be + edf5f05 commit 7a3ecdd

5 files changed

Lines changed: 17 additions & 18 deletions

File tree

Documentation/filesystems/cifs/ksmbd.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ Signing Update Supported.
8282
Pre-authentication integrity Supported.
8383
SMB3 encryption(CCM, GCM) Supported. (CCM and GCM128 supported, GCM256 in
8484
progress)
85-
SMB direct(RDMA) Partially Supported. SMB3 Multi-channel is
86-
required to connect to Windows client.
85+
SMB direct(RDMA) Supported.
8786
SMB3 Multi-channel Partially Supported. Planned to implement
8887
replay/retry mechanisms for future.
88+
Receive Side Scaling mode Supported.
8989
SMB3.1.1 POSIX extension Supported.
9090
ACLs Partially Supported. only DACLs available, SACLs
9191
(auditing) is planned for the future. For

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10668,9 +10668,9 @@ F: tools/testing/selftests/
1066810668

1066910669
KERNEL SMB3 SERVER (KSMBD)
1067010670
M: Namjae Jeon <linkinjeon@kernel.org>
10671-
M: Sergey Senozhatsky <senozhatsky@chromium.org>
1067210671
M: Steve French <sfrench@samba.org>
1067310672
M: Hyunchul Lee <hyc.lee@gmail.com>
10673+
R: Sergey Senozhatsky <senozhatsky@chromium.org>
1067410674
L: linux-cifs@vger.kernel.org
1067510675
S: Maintained
1067610676
T: git git://git.samba.org/ksmbd.git

fs/ksmbd/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static int __init ksmbd_server_init(void)
585585
if (ret)
586586
goto err_crypto_destroy;
587587

588-
pr_warn_once("The ksmbd server is experimental, use at your own risk.\n");
588+
pr_warn_once("The ksmbd server is experimental\n");
589589

590590
return 0;
591591

fs/ksmbd/smb2pdu.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6607,8 +6607,7 @@ int smb2_cancel(struct ksmbd_work *work)
66076607
struct ksmbd_conn *conn = work->conn;
66086608
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
66096609
struct smb2_hdr *chdr;
6610-
struct ksmbd_work *cancel_work = NULL;
6611-
int canceled = 0;
6610+
struct ksmbd_work *cancel_work = NULL, *iter;
66126611
struct list_head *command_list;
66136612

66146613
ksmbd_debug(SMB, "smb2 cancel called on mid %llu, async flags 0x%x\n",
@@ -6618,44 +6617,44 @@ int smb2_cancel(struct ksmbd_work *work)
66186617
command_list = &conn->async_requests;
66196618

66206619
spin_lock(&conn->request_lock);
6621-
list_for_each_entry(cancel_work, command_list,
6620+
list_for_each_entry(iter, command_list,
66226621
async_request_entry) {
6623-
chdr = smb2_get_msg(cancel_work->request_buf);
6622+
chdr = smb2_get_msg(iter->request_buf);
66246623

6625-
if (cancel_work->async_id !=
6624+
if (iter->async_id !=
66266625
le64_to_cpu(hdr->Id.AsyncId))
66276626
continue;
66286627

66296628
ksmbd_debug(SMB,
66306629
"smb2 with AsyncId %llu cancelled command = 0x%x\n",
66316630
le64_to_cpu(hdr->Id.AsyncId),
66326631
le16_to_cpu(chdr->Command));
6633-
canceled = 1;
6632+
cancel_work = iter;
66346633
break;
66356634
}
66366635
spin_unlock(&conn->request_lock);
66376636
} else {
66386637
command_list = &conn->requests;
66396638

66406639
spin_lock(&conn->request_lock);
6641-
list_for_each_entry(cancel_work, command_list, request_entry) {
6642-
chdr = smb2_get_msg(cancel_work->request_buf);
6640+
list_for_each_entry(iter, command_list, request_entry) {
6641+
chdr = smb2_get_msg(iter->request_buf);
66436642

66446643
if (chdr->MessageId != hdr->MessageId ||
6645-
cancel_work == work)
6644+
iter == work)
66466645
continue;
66476646

66486647
ksmbd_debug(SMB,
66496648
"smb2 with mid %llu cancelled command = 0x%x\n",
66506649
le64_to_cpu(hdr->MessageId),
66516650
le16_to_cpu(chdr->Command));
6652-
canceled = 1;
6651+
cancel_work = iter;
66536652
break;
66546653
}
66556654
spin_unlock(&conn->request_lock);
66566655
}
66576656

6658-
if (canceled) {
6657+
if (cancel_work) {
66596658
cancel_work->state = KSMBD_WORK_CANCELLED;
66606659
if (cancel_work->cancel_fn)
66616660
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)
84848483
struct smb2_hdr *hdr = smb2_get_msg(old_buf);
84858484
unsigned int orig_len = get_rfc1002_len(old_buf);
84868485

8487-
memset(tr_buf, 0, sizeof(struct smb2_transform_hdr) + 4);
8486+
/* tr_buf must be cleared by the caller */
84888487
tr_hdr->ProtocolId = SMB2_TRANSFORM_PROTO_NUM;
84898488
tr_hdr->OriginalMessageSize = cpu_to_le32(orig_len);
84908489
tr_hdr->Flags = cpu_to_le16(TRANSFORM_FLAG_ENCRYPTED);

fs/ksmbd/transport_tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,
476476

477477
switch (event) {
478478
case NETDEV_UP:
479-
if (netdev->priv_flags & IFF_BRIDGE_PORT)
479+
if (netif_is_bridge_port(netdev))
480480
return NOTIFY_OK;
481481

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

586586
rtnl_lock();
587587
for_each_netdev(&init_net, netdev) {
588-
if (netdev->priv_flags & IFF_BRIDGE_PORT)
588+
if (netif_is_bridge_port(netdev))
589589
continue;
590590
if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL)))
591591
return -ENOMEM;

0 commit comments

Comments
 (0)