]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/socket.c
[NETFILTER]: x_tables: add quota match
[linux-2.6-omap-h63xx.git] / net / socket.c
index 23898f45f7137d2da995ebe8c89784e1deefaf13..02948b622bd2e938bfc6d02e44f2d13ae2b9f874 100644 (file)
@@ -267,6 +267,8 @@ int move_addr_to_user(void *kaddr, int klen, void __user *uaddr, int __user *ule
                return -EINVAL;
        if(len)
        {
+               if (audit_sockaddr(klen, kaddr))
+                       return -ENOMEM;
                if(copy_to_user(uaddr,kaddr,len))
                        return -EFAULT;
        }
@@ -490,6 +492,7 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
        struct file *file;
        struct socket *sock;
 
+       *err = -EBADF;
        file = fget_light(fd, fput_needed);
        if (file) {
                sock = sock_from_file(file, err);