This is a note to let you know that I've just added the patch titled

    net: Cap number of elements for sendmmsg

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-cap-number-of-elements-for-sendmmsg.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 98382f419f32d2c12d021943b87dea555677144b Mon Sep 17 00:00:00 2001
From: Anton Blanchard <an...@samba.org>
Date: Thu, 4 Aug 2011 14:07:39 +0000
Subject: net: Cap number of elements for sendmmsg

From: Anton Blanchard <an...@samba.org>

commit 98382f419f32d2c12d021943b87dea555677144b upstream.

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 <an...@samba.org>
Signed-off-by: David S. Miller <da...@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>

---
 net/socket.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/socket.c
+++ b/net/socket.c
@@ -1999,6 +1999,9 @@ int __sys_sendmmsg(int fd, struct mmsghd
        struct compat_mmsghdr __user *compat_entry;
        struct msghdr msg_sys;
 
+       if (vlen > UIO_MAXIOV)
+               vlen = UIO_MAXIOV;
+
        datagrams = 0;
 
        sock = sockfd_lookup_light(fd, &err, &fput_needed);


Patches currently in stable-queue which might be from an...@samba.org are

queue-3.0/net-cap-number-of-elements-for-sendmmsg.patch
queue-3.0/net-fix-security_socket_sendmsg-bypass-problem.patch
queue-3.0/net-sendmmsg-should-only-return-an-error-if-no-messages-were-sent.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to