diff options
Diffstat (limited to 'net/compat.c')
-rw-r--r-- | net/compat.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/net/compat.c b/net/compat.c index be5d936dc423..d99ab9695893 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -91,20 +91,11 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, | |||
91 | } else | 91 | } else |
92 | kern_msg->msg_name = NULL; | 92 | kern_msg->msg_name = NULL; |
93 | 93 | ||
94 | if(kern_msg->msg_iovlen > UIO_FASTIOV) { | ||
95 | kern_iov = kmalloc(kern_msg->msg_iovlen * sizeof(struct iovec), | ||
96 | GFP_KERNEL); | ||
97 | if(!kern_iov) | ||
98 | return -ENOMEM; | ||
99 | } | ||
100 | |||
101 | tot_len = iov_from_user_compat_to_kern(kern_iov, | 94 | tot_len = iov_from_user_compat_to_kern(kern_iov, |
102 | (struct compat_iovec __user *)kern_msg->msg_iov, | 95 | (struct compat_iovec __user *)kern_msg->msg_iov, |
103 | kern_msg->msg_iovlen); | 96 | kern_msg->msg_iovlen); |
104 | if(tot_len >= 0) | 97 | if(tot_len >= 0) |
105 | kern_msg->msg_iov = kern_iov; | 98 | kern_msg->msg_iov = kern_iov; |
106 | else if(kern_msg->msg_iovlen > UIO_FASTIOV) | ||
107 | kfree(kern_iov); | ||
108 | 99 | ||
109 | return tot_len; | 100 | return tot_len; |
110 | } | 101 | } |