diff options
author | David S. Miller <davem@davemloft.net> | 2018-08-02 19:55:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-02 19:55:32 +0200 |
commit | 89b1698c93a9dee043154f33d96bca9964e705f1 (patch) | |
tree | dd9dcb1965baae8edcf0b496aaa6a70609b6fc11 /net/socket.c | |
parent | be2net: fix spelling mistake "seqence" -> "sequence" (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-89b1698c93a9dee043154f33d96bca9964e705f1.tar.xz linux-89b1698c93a9dee043154f33d96bca9964e705f1.zip |
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
The BTF conflicts were simple overlapping changes.
The virtio_net conflict was an overlap of a fix of statistics counter,
happening alongisde a move over to a bonafide statistics structure
rather than counting value on the stack.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index 475247e347ae..b91949168a87 100644 --- a/net/socket.c +++ b/net/socket.c @@ -89,6 +89,7 @@ #include <linux/magic.h> #include <linux/slab.h> #include <linux/xattr.h> +#include <linux/nospec.h> #include <linux/uaccess.h> #include <asm/unistd.h> @@ -2529,6 +2530,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) if (call < 1 || call > SYS_SENDMMSG) return -EINVAL; + call = array_index_nospec(call, SYS_SENDMMSG + 1); len = nargs[call]; if (len > sizeof(a)) @@ -2695,7 +2697,8 @@ EXPORT_SYMBOL(sock_unregister); bool sock_is_registered(int family) { - return family < NPROTO && rcu_access_pointer(net_families[family]); + return family < NPROTO && + rcu_access_pointer(net_families[array_index_nospec(family, NPROTO)]); } static int __init sock_init(void) |