]> git.baikalelectronics.ru Git - kernel.git/commit
net: Cap number of elements for sendmmsg
authorAnton Blanchard <anton@samba.org>
Thu, 4 Aug 2011 14:07:39 +0000 (14:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Aug 2011 10:31:03 +0000 (03:31 -0700)
commit12fa20ebc75798fc54f26f8e3e719fc737c4bbc0
treed07b99ec8eec119b53ddc2223de9027d7a8c0263
parent68bdad83ddbe9fd67f24d0558d81c088d14e2f55
net: Cap number of elements for sendmmsg

To limit the amount of time we can spend in sendmmsg, cap the
number of elements to UIO_MAXIOV (currently 1024).

For error handling an application using sendmmsg needs to retry at
the first unsent message, so capping is simpler and requires less
application logic than returning EINVAL.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable <stable@kernel.org> [3.0+]
Signed-off-by: David S. Miller <davem@davemloft.net>
net/socket.c