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
Kirill Smelkov
linux
Commits
4c0abe61
Commit
4c0abe61
authored
Jan 08, 2004
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETLINK]: Use size_t for size in {send,recv}msg.
parent
322d620f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
net/key/af_key.c
net/key/af_key.c
+2
-2
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+4
-4
net/packet/af_packet.c
net/packet/af_packet.c
+3
-3
No files found.
net/key/af_key.c
View file @
4c0abe61
...
@@ -2655,7 +2655,7 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
...
@@ -2655,7 +2655,7 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
}
}
static
int
pfkey_sendmsg
(
struct
kiocb
*
kiocb
,
static
int
pfkey_sendmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sk_buff
*
skb
=
NULL
;
struct
sk_buff
*
skb
=
NULL
;
...
@@ -2697,7 +2697,7 @@ static int pfkey_sendmsg(struct kiocb *kiocb,
...
@@ -2697,7 +2697,7 @@ static int pfkey_sendmsg(struct kiocb *kiocb,
}
}
static
int
pfkey_recvmsg
(
struct
kiocb
*
kiocb
,
static
int
pfkey_recvmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_
t
len
,
int
flags
)
int
flags
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
...
net/netlink/af_netlink.c
View file @
4c0abe61
...
@@ -601,7 +601,7 @@ static inline void netlink_rcv_wake(struct sock *sk)
...
@@ -601,7 +601,7 @@ static inline void netlink_rcv_wake(struct sock *sk)
}
}
static
int
netlink_sendmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
static
int
netlink_sendmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sock_iocb
*
siocb
=
kiocb_to_siocb
(
kiocb
);
struct
sock_iocb
*
siocb
=
kiocb_to_siocb
(
kiocb
);
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
@@ -641,7 +641,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
...
@@ -641,7 +641,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
}
}
err
=
-
EMSGSIZE
;
err
=
-
EMSGSIZE
;
if
(
(
unsigned
)
len
>
sk
->
sk_sndbuf
-
32
)
if
(
len
>
sk
->
sk_sndbuf
-
32
)
goto
out
;
goto
out
;
err
=
-
ENOBUFS
;
err
=
-
ENOBUFS
;
skb
=
alloc_skb
(
len
,
GFP_KERNEL
);
skb
=
alloc_skb
(
len
,
GFP_KERNEL
);
...
@@ -683,7 +683,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
...
@@ -683,7 +683,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
}
}
static
int
netlink_recvmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
static
int
netlink_recvmsg
(
struct
kiocb
*
kiocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
,
struct
msghdr
*
msg
,
size_
t
len
,
int
flags
)
int
flags
)
{
{
struct
sock_iocb
*
siocb
=
kiocb_to_siocb
(
kiocb
);
struct
sock_iocb
*
siocb
=
kiocb_to_siocb
(
kiocb
);
...
@@ -691,7 +691,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
...
@@ -691,7 +691,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
netlink_opt
*
nlk
=
nlk_sk
(
sk
);
struct
netlink_opt
*
nlk
=
nlk_sk
(
sk
);
int
noblock
=
flags
&
MSG_DONTWAIT
;
int
noblock
=
flags
&
MSG_DONTWAIT
;
in
t
copied
;
size_
t
copied
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
err
;
int
err
;
...
...
net/packet/af_packet.c
View file @
4c0abe61
...
@@ -284,7 +284,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct
...
@@ -284,7 +284,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct
*/
*/
static
int
packet_sendmsg_spkt
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
packet_sendmsg_spkt
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sockaddr_pkt
*
saddr
=
(
struct
sockaddr_pkt
*
)
msg
->
msg_name
;
struct
sockaddr_pkt
*
saddr
=
(
struct
sockaddr_pkt
*
)
msg
->
msg_name
;
...
@@ -659,7 +659,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
...
@@ -659,7 +659,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
static
int
packet_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
packet_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sockaddr_ll
*
saddr
=
(
struct
sockaddr_ll
*
)
msg
->
msg_name
;
struct
sockaddr_ll
*
saddr
=
(
struct
sockaddr_ll
*
)
msg
->
msg_name
;
...
@@ -1007,7 +1007,7 @@ static int packet_create(struct socket *sock, int protocol)
...
@@ -1007,7 +1007,7 @@ static int packet_create(struct socket *sock, int protocol)
*/
*/
static
int
packet_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
packet_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
,
int
flags
)
struct
msghdr
*
msg
,
size_
t
len
,
int
flags
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
...
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