netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make {send|recv}msg return code 1003.1 compatible
@ 2003-07-09 19:36 Thomas Graf
  2003-07-10  5:52 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Graf @ 2003-07-09 19:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, tgraf

Hello

1003.1 says:

[EMSGSIZE]
    The msg_iovlen member of the msghdr structure pointed to by
    message is less than or equal to 0, or is greater than
    {IOV_MAX}.

The patch changes the return code of {send|recv}msg from EINVAL
to EMSGSIZE.

 -- thomas


Index: net/socket.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/socket.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 socket.c
--- net/socket.c	9 Jul 2003 18:42:29 -0000	1.1.1.1
+++ net/socket.c	9 Jul 2003 19:17:29 -0000
@@ -1614,7 +1614,7 @@
 		goto out;
 
 	/* do not move before msg_sys is valid */
-	err = -EINVAL;
+	err = -EMSGSIZE;
 	if (msg_sys.msg_iovlen > UIO_MAXIOV)
 		goto out_put;
 
@@ -1713,7 +1713,7 @@
 	if (!sock)
 		goto out;
 
-	err = -EINVAL;
+	err = -EMSGSIZE;
 	if (msg_sys.msg_iovlen > UIO_MAXIOV)
 		goto out_put;
 	

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-10  5:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-09 19:36 [PATCH] make {send|recv}msg return code 1003.1 compatible Thomas Graf
2003-07-10  5:52 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).