aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/socket.c b/net/socket.c
index b807f360e02c..02948b622bd2 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -119,10 +119,6 @@ static ssize_t sock_writev(struct file *file, const struct iovec *vector,
119static ssize_t sock_sendpage(struct file *file, struct page *page, 119static ssize_t sock_sendpage(struct file *file, struct page *page,
120 int offset, size_t size, loff_t *ppos, int more); 120 int offset, size_t size, loff_t *ppos, int more);
121 121
122extern ssize_t generic_splice_sendpage(struct inode *inode, struct file *out,
123 size_t len, unsigned int flags);
124
125
126/* 122/*
127 * Socket files have a set of 'special' operations as well as the generic file ones. These don't appear 123 * Socket files have a set of 'special' operations as well as the generic file ones. These don't appear
128 * in the operation structures but are done directly via the socketcall() multiplexor. 124 * in the operation structures but are done directly via the socketcall() multiplexor.
@@ -271,6 +267,8 @@ int move_addr_to_user(void *kaddr, int klen, void __user *uaddr, int __user *ule
271 return -EINVAL; 267 return -EINVAL;
272 if(len) 268 if(len)
273 { 269 {
270 if (audit_sockaddr(klen, kaddr))
271 return -ENOMEM;
274 if(copy_to_user(uaddr,kaddr,len)) 272 if(copy_to_user(uaddr,kaddr,len))
275 return -EFAULT; 273 return -EFAULT;
276 } 274 }
@@ -494,6 +492,7 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
494 struct file *file; 492 struct file *file;
495 struct socket *sock; 493 struct socket *sock;
496 494
495 *err = -EBADF;
497 file = fget_light(fd, fput_needed); 496 file = fget_light(fd, fput_needed);
498 if (file) { 497 if (file) {
499 sock = sock_from_file(file, err); 498 sock = sock_from_file(file, err);
@@ -2136,7 +2135,7 @@ void socket_seq_show(struct seq_file *seq)
2136 int cpu; 2135 int cpu;
2137 int counter = 0; 2136 int counter = 0;
2138 2137
2139 for_each_cpu(cpu) 2138 for_each_possible_cpu(cpu)
2140 counter += per_cpu(sockets_in_use, cpu); 2139 counter += per_cpu(sockets_in_use, cpu);
2141 2140
2142 /* It can be negative, by the way. 8) */ 2141 /* It can be negative, by the way. 8) */