Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e6b6c7ee
Commit
e6b6c7ee
authored
Jun 05, 2004
by
Olaf Hering
Committed by
Linus Torvalds
Jun 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Fix compat bug in recvmsg/sendmsg wrt MSG_CMSG_COMPAT.
parent
21eca083
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
15 additions
and
16 deletions
+15
-16
net/appletalk/ddp.c
net/appletalk/ddp.c
+1
-1
net/ax25/af_ax25.c
net/ax25/af_ax25.c
+1
-2
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+1
-1
net/econet/af_econet.c
net/econet/af_econet.c
+2
-2
net/ipx/af_ipx.c
net/ipx/af_ipx.c
+1
-1
net/irda/af_irda.c
net/irda/af_irda.c
+3
-3
net/key/af_key.c
net/key/af_key.c
+1
-1
net/netrom/af_netrom.c
net/netrom/af_netrom.c
+1
-1
net/packet/af_packet.c
net/packet/af_packet.c
+1
-1
net/rose/af_rose.c
net/rose/af_rose.c
+1
-1
net/wanrouter/af_wanpipe.c
net/wanrouter/af_wanpipe.c
+1
-1
net/x25/af_x25.c
net/x25/af_x25.c
+1
-1
No files found.
net/appletalk/ddp.c
View file @
e6b6c7ee
...
...
@@ -1567,7 +1567,7 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
struct
atalk_route
*
rt
;
int
err
;
if
(
flags
&
~
MSG_DONTWAIT
)
if
(
flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
return
-
EINVAL
;
if
(
len
>
DDP_MAXSZ
)
...
...
net/ax25/af_ax25.c
View file @
e6b6c7ee
...
...
@@ -1413,9 +1413,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
size_t
size
;
int
lv
,
err
,
addr_len
=
msg
->
msg_namelen
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
{
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
|
MSG_CMSG_COMPAT
))
return
-
EINVAL
;
}
lock_sock
(
sk
);
ax25
=
ax25_sk
(
sk
);
...
...
net/decnet/af_decnet.c
View file @
e6b6c7ee
...
...
@@ -1905,7 +1905,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned
char
fctype
;
long
timeo
=
sock_sndtimeo
(
sk
,
flags
&
MSG_DONTWAIT
);
if
(
flags
&
~
(
MSG_TRYHARD
|
MSG_OOB
|
MSG_DONTWAIT
|
MSG_EOR
|
MSG_NOSIGNAL
|
MSG_MORE
))
if
(
flags
&
~
(
MSG_TRYHARD
|
MSG_OOB
|
MSG_DONTWAIT
|
MSG_EOR
|
MSG_NOSIGNAL
|
MSG_MORE
|
MSG_CMSG_COMPAT
))
return
-
EOPNOTSUPP
;
if
(
addr_len
&&
(
addr_len
!=
sizeof
(
struct
sockaddr_dn
)))
...
...
net/econet/af_econet.c
View file @
e6b6c7ee
...
...
@@ -274,8 +274,8 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
* Check the flags.
*/
if
(
msg
->
msg_flags
&~
MSG_DONTWAIT
)
return
(
-
EINVAL
)
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
return
-
EINVAL
;
/*
* Get and verify the address.
...
...
net/ipx/af_ipx.c
View file @
e6b6c7ee
...
...
@@ -1695,7 +1695,7 @@ static int ipx_sendmsg(struct kiocb *iocb, struct socket *sock,
/* Socket gets bound below anyway */
/* if (sk->sk_zapped)
return -EIO; */
/* Socket not bound */
if
(
flags
&
~
MSG_DONTWAIT
)
if
(
flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
goto
out
;
/* Max possible packet size limited by 16 bit pktsize in header */
...
...
net/irda/af_irda.c
View file @
e6b6c7ee
...
...
@@ -1269,7 +1269,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG
(
4
,
"%s(), len=%d
\n
"
,
__FUNCTION__
,
len
);
/* Note : socket.c set MSG_EOR on SEQPACKET sockets */
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
|
MSG_CMSG_COMPAT
))
return
-
EINVAL
;
if
(
sk
->
sk_shutdown
&
SEND_SHUTDOWN
)
{
...
...
@@ -1521,7 +1521,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG
(
4
,
"%s(), len=%d
\n
"
,
__FUNCTION__
,
len
);
if
(
msg
->
msg_flags
&
~
MSG_DONTWAIT
)
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
return
-
EINVAL
;
if
(
sk
->
sk_shutdown
&
SEND_SHUTDOWN
)
{
...
...
@@ -1593,7 +1593,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG
(
4
,
"%s(), len=%d
\n
"
,
__FUNCTION__
,
len
);
if
(
msg
->
msg_flags
&
~
MSG_DONTWAIT
)
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
return
-
EINVAL
;
if
(
sk
->
sk_shutdown
&
SEND_SHUTDOWN
)
{
...
...
net/key/af_key.c
View file @
e6b6c7ee
...
...
@@ -2726,7 +2726,7 @@ static int pfkey_recvmsg(struct kiocb *kiocb,
int
copied
,
err
;
err
=
-
EINVAL
;
if
(
flags
&
~
(
MSG_PEEK
|
MSG_DONTWAIT
|
MSG_TRUNC
))
if
(
flags
&
~
(
MSG_PEEK
|
MSG_DONTWAIT
|
MSG_TRUNC
|
MSG_CMSG_COMPAT
))
goto
out
;
msg
->
msg_namelen
=
0
;
...
...
net/netrom/af_netrom.c
View file @
e6b6c7ee
...
...
@@ -1021,7 +1021,7 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned
char
*
asmptr
;
int
size
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
|
MSG_CMSG_COMPAT
))
return
-
EINVAL
;
lock_sock
(
sk
);
...
...
net/packet/af_packet.c
View file @
e6b6c7ee
...
...
@@ -1037,7 +1037,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
int
copied
,
err
;
err
=
-
EINVAL
;
if
(
flags
&
~
(
MSG_PEEK
|
MSG_DONTWAIT
|
MSG_TRUNC
))
if
(
flags
&
~
(
MSG_PEEK
|
MSG_DONTWAIT
|
MSG_TRUNC
|
MSG_CMSG_COMPAT
))
goto
out
;
#if 0
...
...
net/rose/af_rose.c
View file @
e6b6c7ee
...
...
@@ -1021,7 +1021,7 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned
char
*
asmptr
;
int
n
,
size
,
qbit
=
0
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
|
MSG_CMSG_COMPAT
))
return
-
EINVAL
;
if
(
sk
->
sk_zapped
)
...
...
net/wanrouter/af_wanpipe.c
View file @
e6b6c7ee
...
...
@@ -552,7 +552,7 @@ static int wanpipe_sendmsg(struct kiocb *iocb, struct socket *sock,
if
(
sk
->
sk_state
!=
WANSOCK_CONNECTED
)
return
-
ENOTCONN
;
if
(
msg
->
msg_flags
&~
MSG_DONTWAIT
)
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_CMSG_COMPAT
)
)
return
(
-
EINVAL
);
/* it was <=, now one can send
...
...
net/x25/af_x25.c
View file @
e6b6c7ee
...
...
@@ -922,7 +922,7 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
size_t
size
;
int
qbit
=
0
,
rc
=
-
EINVAL
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_OOB
|
MSG_EOR
))
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_OOB
|
MSG_EOR
|
MSG_CMSG_COMPAT
))
goto
out
;
/* we currently don't support segmented records at the user interface */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment