summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-01-31 21:51:47 +0100
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-02-15 17:03:32 -0500
commit97f8b87e9108485a0b7070645662253561304458 (patch)
treebd50c70ebf1715be2947087cd8ca341b06bbdbce /net
parentaba79f332f46ca8529f3e62a9fc2926c8fe75e44 (diff)
tipc: remove redundant checking for the number of iovecs in a send request
As the number of iovecs in a send request is already limited within UIO_MAXIOV(i.e. 1024) in __sys_sendmsg(), it's unnecessary to check it again in TIPC stack. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/socket.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index cbe2f6ecf07..a9622b6cd91 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -503,8 +503,7 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
if (unlikely((m->msg_namelen < sizeof(*dest)) ||
(dest->family != AF_TIPC)))
return -EINVAL;
- if ((total_len > TIPC_MAX_USER_MSG_SIZE) ||
- (m->msg_iovlen > (unsigned int)INT_MAX))
+ if (total_len > TIPC_MAX_USER_MSG_SIZE)
return -EMSGSIZE;
if (iocb)
@@ -612,8 +611,7 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
if (unlikely(dest))
return send_msg(iocb, sock, m, total_len);
- if ((total_len > TIPC_MAX_USER_MSG_SIZE) ||
- (m->msg_iovlen > (unsigned int)INT_MAX))
+ if (total_len > TIPC_MAX_USER_MSG_SIZE)
return -EMSGSIZE;
if (iocb)
@@ -698,8 +696,7 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,
goto exit;
}
- if ((total_len > (unsigned int)INT_MAX) ||
- (m->msg_iovlen > (unsigned int)INT_MAX)) {
+ if (total_len > (unsigned int)INT_MAX) {
res = -EMSGSIZE;
goto exit;
}