From: Thomas Graf <tgraf@suug.ch>
To: davem@redhat.com
Cc: netdev@oss.sgi.com, tgraf@suug.ch
Subject: [PATCH] make {send|recv}msg return code 1003.1 compatible
Date: Wed, 9 Jul 2003 21:36:28 +0200 [thread overview]
Message-ID: <20030709193628.GR2702@rei.rakuen> (raw)
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;
next reply other threads:[~2003-07-09 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-09 19:36 Thomas Graf [this message]
2003-07-10 5:52 ` [PATCH] make {send|recv}msg return code 1003.1 compatible David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030709193628.GR2702@rei.rakuen \
--to=tgraf@suug.ch \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox