Skip to content

Commit 8c6f6a7

Browse files
committed
Merge tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French: - Fix netlink OOB - Minor kernel doc fix * tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix global oob in ksmbd_nl_policy smb: Fix some kernel-doc comments
2 parents d1bba17 + ebeae8a commit 8c6f6a7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

fs/smb/server/ksmbd_netlink.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ enum ksmbd_event {
304304
KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST,
305305
KSMBD_EVENT_SPNEGO_AUTHEN_RESPONSE = 15,
306306

307-
KSMBD_EVENT_MAX
307+
__KSMBD_EVENT_MAX,
308+
KSMBD_EVENT_MAX = __KSMBD_EVENT_MAX - 1
308309
};
309310

310311
/*

fs/smb/server/transport_ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int handle_unsupported_event(struct sk_buff *skb, struct genl_info *info)
7474
static int handle_generic_event(struct sk_buff *skb, struct genl_info *info);
7575
static int ksmbd_ipc_heartbeat_request(void);
7676

77-
static const struct nla_policy ksmbd_nl_policy[KSMBD_EVENT_MAX] = {
77+
static const struct nla_policy ksmbd_nl_policy[KSMBD_EVENT_MAX + 1] = {
7878
[KSMBD_EVENT_UNSPEC] = {
7979
.len = 0,
8080
},
@@ -403,7 +403,7 @@ static int handle_generic_event(struct sk_buff *skb, struct genl_info *info)
403403
return -EPERM;
404404
#endif
405405

406-
if (type >= KSMBD_EVENT_MAX) {
406+
if (type > KSMBD_EVENT_MAX) {
407407
WARN_ON(1);
408408
return -EINVAL;
409409
}

fs/smb/server/transport_tcp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig,
365365
* @t: TCP transport instance
366366
* @buf: buffer to store read data from socket
367367
* @to_read: number of bytes to read from socket
368+
* @max_retries: number of retries if reading from socket fails
368369
*
369370
* Return: on success return number of bytes read from socket,
370371
* otherwise return error number
@@ -416,6 +417,7 @@ static void tcp_destroy_socket(struct socket *ksmbd_socket)
416417

417418
/**
418419
* create_socket - create socket for ksmbd/0
420+
* @iface: interface to bind the created socket to
419421
*
420422
* Return: 0 on success, error number otherwise
421423
*/

0 commit comments

Comments
 (0)