aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-01-11 21:27:54 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-11 22:13:42 -0500
commit19d28fbd306e7ae7c1acf05c3e6968b56f0d196b (patch)
tree0584a3a4639424733bad7714796f858aa7addee7 /net/socket.c
parent8c2e6c904fd8701a8d02d2bdb86871dc3ec4e85b (diff)
parent1545dec46db3858bbce84c2065b579e2925706ab (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
BPF alignment tests got a conflict because the registers are output as Rn_w instead of just Rn in net-next, and in net a fixup for a testcase prohibits logical operations on pointers before using them. Also, we should attempt to patch BPF call args if JIT always on is enabled. Instead, if we fail to JIT the subprogs we should pass an error back up and fail immediately. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index bbd2e9ceb692..fbfae1ed3ff5 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -430,8 +430,10 @@ static int sock_map_fd(struct socket *sock, int flags)
430{ 430{
431 struct file *newfile; 431 struct file *newfile;
432 int fd = get_unused_fd_flags(flags); 432 int fd = get_unused_fd_flags(flags);
433 if (unlikely(fd < 0)) 433 if (unlikely(fd < 0)) {
434 sock_release(sock);
434 return fd; 435 return fd;
436 }
435 437
436 newfile = sock_alloc_file(sock, flags, NULL); 438 newfile = sock_alloc_file(sock, flags, NULL);
437 if (likely(!IS_ERR(newfile))) { 439 if (likely(!IS_ERR(newfile))) {
@@ -2611,6 +2613,15 @@ out_fs:
2611 2613
2612core_initcall(sock_init); /* early initcall */ 2614core_initcall(sock_init); /* early initcall */
2613 2615
2616static int __init jit_init(void)
2617{
2618#ifdef CONFIG_BPF_JIT_ALWAYS_ON
2619 bpf_jit_enable = 1;
2620#endif
2621 return 0;
2622}
2623pure_initcall(jit_init);
2624
2614#ifdef CONFIG_PROC_FS 2625#ifdef CONFIG_PROC_FS
2615void socket_seq_show(struct seq_file *seq) 2626void socket_seq_show(struct seq_file *seq)
2616{ 2627{