Commit 8c6f6a76 authored by Linus Torvalds's avatar Linus Torvalds

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
parents d1bba17e ebeae8ad
...@@ -304,7 +304,8 @@ enum ksmbd_event { ...@@ -304,7 +304,8 @@ enum ksmbd_event {
KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST, KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST,
KSMBD_EVENT_SPNEGO_AUTHEN_RESPONSE = 15, KSMBD_EVENT_SPNEGO_AUTHEN_RESPONSE = 15,
KSMBD_EVENT_MAX __KSMBD_EVENT_MAX,
KSMBD_EVENT_MAX = __KSMBD_EVENT_MAX - 1
}; };
/* /*
......
...@@ -74,7 +74,7 @@ static int handle_unsupported_event(struct sk_buff *skb, struct genl_info *info) ...@@ -74,7 +74,7 @@ static int handle_unsupported_event(struct sk_buff *skb, struct genl_info *info)
static int handle_generic_event(struct sk_buff *skb, struct genl_info *info); static int handle_generic_event(struct sk_buff *skb, struct genl_info *info);
static int ksmbd_ipc_heartbeat_request(void); static int ksmbd_ipc_heartbeat_request(void);
static const struct nla_policy ksmbd_nl_policy[KSMBD_EVENT_MAX] = { static const struct nla_policy ksmbd_nl_policy[KSMBD_EVENT_MAX + 1] = {
[KSMBD_EVENT_UNSPEC] = { [KSMBD_EVENT_UNSPEC] = {
.len = 0, .len = 0,
}, },
...@@ -403,7 +403,7 @@ static int handle_generic_event(struct sk_buff *skb, struct genl_info *info) ...@@ -403,7 +403,7 @@ static int handle_generic_event(struct sk_buff *skb, struct genl_info *info)
return -EPERM; return -EPERM;
#endif #endif
if (type >= KSMBD_EVENT_MAX) { if (type > KSMBD_EVENT_MAX) {
WARN_ON(1); WARN_ON(1);
return -EINVAL; return -EINVAL;
} }
......
...@@ -365,6 +365,7 @@ static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig, ...@@ -365,6 +365,7 @@ static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig,
* @t: TCP transport instance * @t: TCP transport instance
* @buf: buffer to store read data from socket * @buf: buffer to store read data from socket
* @to_read: number of bytes to read from socket * @to_read: number of bytes to read from socket
* @max_retries: number of retries if reading from socket fails
* *
* Return: on success return number of bytes read from socket, * Return: on success return number of bytes read from socket,
* otherwise return error number * otherwise return error number
...@@ -416,6 +417,7 @@ static void tcp_destroy_socket(struct socket *ksmbd_socket) ...@@ -416,6 +417,7 @@ static void tcp_destroy_socket(struct socket *ksmbd_socket)
/** /**
* create_socket - create socket for ksmbd/0 * create_socket - create socket for ksmbd/0
* @iface: interface to bind the created socket to
* *
* Return: 0 on success, error number otherwise * Return: 0 on success, error number otherwise
*/ */
......
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