Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6ce8e9ce
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6ce8e9ce
编写于
4月 06, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new helper: memcpy_from_msg()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
227158db
变更
36
隐藏空白更改
内联
并排
Showing
36 changed file
with
57 addition
and
57 deletion
+57
-57
crypto/algif_skcipher.c
crypto/algif_skcipher.c
+5
-5
drivers/isdn/mISDN/socket.c
drivers/isdn/mISDN/socket.c
+1
-1
drivers/net/ppp/pppoe.c
drivers/net/ppp/pppoe.c
+1
-1
include/linux/skbuff.h
include/linux/skbuff.h
+5
-0
include/net/sctp/sm.h
include/net/sctp/sm.h
+1
-1
net/appletalk/ddp.c
net/appletalk/ddp.c
+1
-1
net/ax25/af_ax25.c
net/ax25/af_ax25.c
+1
-1
net/bluetooth/hci_sock.c
net/bluetooth/hci_sock.c
+1
-1
net/bluetooth/mgmt.c
net/bluetooth/mgmt.c
+1
-1
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+1
-1
net/bluetooth/sco.c
net/bluetooth/sco.c
+1
-1
net/caif/caif_socket.c
net/caif/caif_socket.c
+2
-2
net/can/bcm.c
net/can/bcm.c
+8
-11
net/can/raw.c
net/can/raw.c
+1
-1
net/dccp/proto.c
net/dccp/proto.c
+1
-1
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+1
-1
net/ieee802154/dgram.c
net/ieee802154/dgram.c
+1
-1
net/ieee802154/raw.c
net/ieee802154/raw.c
+1
-1
net/ipv4/ping.c
net/ipv4/ping.c
+1
-1
net/ipv4/tcp_input.c
net/ipv4/tcp_input.c
+1
-1
net/irda/af_irda.c
net/irda/af_irda.c
+3
-3
net/iucv/af_iucv.c
net/iucv/af_iucv.c
+1
-1
net/key/af_key.c
net/key/af_key.c
+1
-1
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip.c
+1
-1
net/l2tp/l2tp_ppp.c
net/l2tp/l2tp_ppp.c
+1
-2
net/llc/af_llc.c
net/llc/af_llc.c
+1
-1
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+1
-1
net/netrom/af_netrom.c
net/netrom/af_netrom.c
+1
-1
net/nfc/llcp_commands.c
net/nfc/llcp_commands.c
+2
-2
net/nfc/rawsock.c
net/nfc/rawsock.c
+1
-1
net/packet/af_packet.c
net/packet/af_packet.c
+2
-3
net/phonet/datagram.c
net/phonet/datagram.c
+1
-1
net/phonet/pep.c
net/phonet/pep.c
+1
-1
net/rose/af_rose.c
net/rose/af_rose.c
+1
-1
net/sctp/sm_make_chunk.c
net/sctp/sm_make_chunk.c
+2
-2
net/x25/af_x25.c
net/x25/af_x25.c
+1
-1
未找到文件。
crypto/algif_skcipher.c
浏览文件 @
6ce8e9ce
...
...
@@ -298,9 +298,9 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock,
len
=
min_t
(
unsigned
long
,
len
,
PAGE_SIZE
-
sg
->
offset
-
sg
->
length
);
err
=
memcpy_from
iovec
(
page_address
(
sg_page
(
sg
))
+
sg
->
offset
+
sg
->
length
,
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
page_address
(
sg_page
(
sg
))
+
sg
->
offset
+
sg
->
length
,
msg
,
len
);
if
(
err
)
goto
unlock
;
...
...
@@ -337,8 +337,8 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock,
if
(
!
sg_page
(
sg
+
i
))
goto
unlock
;
err
=
memcpy_from
iovec
(
page_address
(
sg_page
(
sg
+
i
)),
msg
->
msg_iov
,
plen
);
err
=
memcpy_from
_msg
(
page_address
(
sg_page
(
sg
+
i
)),
msg
,
plen
);
if
(
err
)
{
__free_page
(
sg_page
(
sg
+
i
));
sg_assign_page
(
sg
+
i
,
NULL
);
...
...
drivers/isdn/mISDN/socket.c
浏览文件 @
6ce8e9ce
...
...
@@ -203,7 +203,7 @@ mISDN_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
if
(
!
skb
)
goto
done
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
err
=
-
EFAULT
;
goto
done
;
}
...
...
drivers/net/ppp/pppoe.c
浏览文件 @
6ce8e9ce
...
...
@@ -869,7 +869,7 @@ static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock,
ph
=
(
struct
pppoe_hdr
*
)
skb_put
(
skb
,
total_len
+
sizeof
(
struct
pppoe_hdr
));
start
=
(
char
*
)
&
ph
->
tag
[
0
];
error
=
memcpy_from
iovec
(
start
,
m
->
msg_iov
,
total_len
);
error
=
memcpy_from
_msg
(
start
,
m
,
total_len
);
if
(
error
<
0
)
{
kfree_skb
(
skb
);
goto
end
;
...
...
include/linux/skbuff.h
浏览文件 @
6ce8e9ce
...
...
@@ -2687,6 +2687,11 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len);
int
skb_vlan_pop
(
struct
sk_buff
*
skb
);
int
skb_vlan_push
(
struct
sk_buff
*
skb
,
__be16
vlan_proto
,
u16
vlan_tci
);
static
inline
int
memcpy_from_msg
(
void
*
data
,
struct
msghdr
*
msg
,
int
len
)
{
return
memcpy_fromiovec
(
data
,
msg
->
msg_iov
,
len
);
}
struct
skb_checksum_ops
{
__wsum
(
*
update
)(
const
void
*
mem
,
int
len
,
__wsum
wsum
);
__wsum
(
*
combine
)(
__wsum
csum
,
__wsum
csum2
,
int
offset
,
int
len
);
...
...
include/net/sctp/sm.h
浏览文件 @
6ce8e9ce
...
...
@@ -219,7 +219,7 @@ struct sctp_chunk *sctp_make_abort_no_data(const struct sctp_association *,
const
struct
sctp_chunk
*
,
__u32
tsn
);
struct
sctp_chunk
*
sctp_make_abort_user
(
const
struct
sctp_association
*
,
const
struct
msghdr
*
,
size_t
msg_len
);
struct
msghdr
*
,
size_t
msg_len
);
struct
sctp_chunk
*
sctp_make_abort_violation
(
const
struct
sctp_association
*
,
const
struct
sctp_chunk
*
,
const
__u8
*
,
...
...
net/appletalk/ddp.c
浏览文件 @
6ce8e9ce
...
...
@@ -1659,7 +1659,7 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
SOCK_DEBUG
(
sk
,
"SK %p: Copy user data (%Zd bytes).
\n
"
,
sk
,
len
);
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
err
=
-
EFAULT
;
...
...
net/ax25/af_ax25.c
浏览文件 @
6ce8e9ce
...
...
@@ -1549,7 +1549,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reserve
(
skb
,
size
-
len
);
/* User data follows immediately after the AX.25 data */
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
err
=
-
EFAULT
;
kfree_skb
(
skb
);
goto
out
;
...
...
net/bluetooth/hci_sock.c
浏览文件 @
6ce8e9ce
...
...
@@ -947,7 +947,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
if
(
!
skb
)
goto
done
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
err
=
-
EFAULT
;
goto
drop
;
}
...
...
net/bluetooth/mgmt.c
浏览文件 @
6ce8e9ce
...
...
@@ -5767,7 +5767,7 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
if
(
!
buf
)
return
-
ENOMEM
;
if
(
memcpy_from
iovec
(
buf
,
msg
->
msg_iov
,
msglen
))
{
if
(
memcpy_from
_msg
(
buf
,
msg
,
msglen
))
{
err
=
-
EFAULT
;
goto
done
;
}
...
...
net/bluetooth/rfcomm/sock.c
浏览文件 @
6ce8e9ce
...
...
@@ -588,7 +588,7 @@ static int rfcomm_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
}
skb_reserve
(
skb
,
RFCOMM_SKB_HEAD_RESERVE
);
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
);
if
(
err
)
{
kfree_skb
(
skb
);
if
(
sent
==
0
)
...
...
net/bluetooth/sco.c
浏览文件 @
6ce8e9ce
...
...
@@ -285,7 +285,7 @@ static int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
if
(
!
skb
)
return
err
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
kfree_skb
(
skb
);
return
-
EFAULT
;
}
...
...
net/caif/caif_socket.c
浏览文件 @
6ce8e9ce
...
...
@@ -566,7 +566,7 @@ static int caif_seqpkt_sendmsg(struct kiocb *kiocb, struct socket *sock,
skb_reserve
(
skb
,
cf_sk
->
headroom
);
ret
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
ret
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
ret
)
goto
err
;
...
...
@@ -641,7 +641,7 @@ static int caif_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
*/
size
=
min_t
(
int
,
size
,
skb_tailroom
(
skb
));
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
);
if
(
err
)
{
kfree_skb
(
skb
);
goto
out_err
;
...
...
net/can/bcm.c
浏览文件 @
6ce8e9ce
...
...
@@ -858,8 +858,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
/* update can_frames content */
for
(
i
=
0
;
i
<
msg_head
->
nframes
;
i
++
)
{
err
=
memcpy_fromiovec
((
u8
*
)
&
op
->
frames
[
i
],
msg
->
msg_iov
,
CFSIZ
);
err
=
memcpy_from_msg
((
u8
*
)
&
op
->
frames
[
i
],
msg
,
CFSIZ
);
if
(
op
->
frames
[
i
].
can_dlc
>
8
)
err
=
-
EINVAL
;
...
...
@@ -894,8 +893,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op
->
frames
=
&
op
->
sframe
;
for
(
i
=
0
;
i
<
msg_head
->
nframes
;
i
++
)
{
err
=
memcpy_fromiovec
((
u8
*
)
&
op
->
frames
[
i
],
msg
->
msg_iov
,
CFSIZ
);
err
=
memcpy_from_msg
((
u8
*
)
&
op
->
frames
[
i
],
msg
,
CFSIZ
);
if
(
op
->
frames
[
i
].
can_dlc
>
8
)
err
=
-
EINVAL
;
...
...
@@ -1024,9 +1022,8 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if
(
msg_head
->
nframes
)
{
/* update can_frames content */
err
=
memcpy_fromiovec
((
u8
*
)
op
->
frames
,
msg
->
msg_iov
,
msg_head
->
nframes
*
CFSIZ
);
err
=
memcpy_from_msg
((
u8
*
)
op
->
frames
,
msg
,
msg_head
->
nframes
*
CFSIZ
);
if
(
err
<
0
)
return
err
;
...
...
@@ -1072,8 +1069,8 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
if
(
msg_head
->
nframes
)
{
err
=
memcpy_from
iovec
((
u8
*
)
op
->
frames
,
msg
->
msg_iov
,
msg_head
->
nframes
*
CFSIZ
);
err
=
memcpy_from
_msg
((
u8
*
)
op
->
frames
,
msg
,
msg_head
->
nframes
*
CFSIZ
);
if
(
err
<
0
)
{
if
(
op
->
frames
!=
&
op
->
sframe
)
kfree
(
op
->
frames
);
...
...
@@ -1209,7 +1206,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)
can_skb_reserve
(
skb
);
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
CFSIZ
),
msg
->
msg_iov
,
CFSIZ
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
CFSIZ
),
msg
,
CFSIZ
);
if
(
err
<
0
)
{
kfree_skb
(
skb
);
return
err
;
...
...
@@ -1285,7 +1282,7 @@ static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock,
/* read message head information */
ret
=
memcpy_from
iovec
((
u8
*
)
&
msg_head
,
msg
->
msg_iov
,
MHSIZ
);
ret
=
memcpy_from
_msg
((
u8
*
)
&
msg_head
,
msg
,
MHSIZ
);
if
(
ret
<
0
)
return
ret
;
...
...
net/can/raw.c
浏览文件 @
6ce8e9ce
...
...
@@ -703,7 +703,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
can_skb_reserve
(
skb
);
can_skb_prv
(
skb
)
->
ifindex
=
dev
->
ifindex
;
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
);
if
(
err
<
0
)
goto
free_skb
;
...
...
net/dccp/proto.c
浏览文件 @
6ce8e9ce
...
...
@@ -781,7 +781,7 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
goto
out_release
;
skb_reserve
(
skb
,
sk
->
sk_prot
->
max_header
);
rc
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
rc
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
rc
!=
0
)
goto
out_discard
;
...
...
net/decnet/af_decnet.c
浏览文件 @
6ce8e9ce
...
...
@@ -2032,7 +2032,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reserve
(
skb
,
64
+
DN_MAX_NSP_DATA_HEADER
);
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
err
=
-
EFAULT
;
goto
out
;
}
...
...
net/ieee802154/dgram.c
浏览文件 @
6ce8e9ce
...
...
@@ -276,7 +276,7 @@ static int dgram_sendmsg(struct kiocb *iocb, struct sock *sk,
if
(
err
<
0
)
goto
out_skb
;
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
);
if
(
err
<
0
)
goto
out_skb
;
...
...
net/ieee802154/raw.c
浏览文件 @
6ce8e9ce
...
...
@@ -150,7 +150,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk,
skb_reset_mac_header
(
skb
);
skb_reset_network_header
(
skb
);
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
);
if
(
err
<
0
)
goto
out_skb
;
...
...
net/ipv4/ping.c
浏览文件 @
6ce8e9ce
...
...
@@ -660,7 +660,7 @@ int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
* Fetch the ICMP header provided by the userland.
* iovec is modified! The ICMP header is consumed.
*/
if
(
memcpy_from
iovec
(
user_icmph
,
msg
->
msg_iov
,
icmph_len
))
if
(
memcpy_from
_msg
(
user_icmph
,
msg
,
icmph_len
))
return
-
EFAULT
;
if
(
family
==
AF_INET
)
{
...
...
net/ipv4/tcp_input.c
浏览文件 @
6ce8e9ce
...
...
@@ -4368,7 +4368,7 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size)
if
(
tcp_try_rmem_schedule
(
sk
,
skb
,
skb
->
truesize
))
goto
err_free
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
size
),
msg
->
msg_iov
,
size
))
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
size
),
msg
,
size
))
goto
err_free
;
TCP_SKB_CB
(
skb
)
->
seq
=
tcp_sk
(
sk
)
->
rcv_nxt
;
...
...
net/irda/af_irda.c
浏览文件 @
6ce8e9ce
...
...
@@ -1319,7 +1319,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reserve
(
skb
,
self
->
max_header_size
+
16
);
skb_reset_transport_header
(
skb
);
skb_put
(
skb
,
len
);
err
=
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
goto
out_err
;
...
...
@@ -1569,7 +1569,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
pr_debug
(
"%s(), appending user data
\n
"
,
__func__
);
skb_put
(
skb
,
len
);
err
=
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
goto
out
;
...
...
@@ -1678,7 +1678,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
pr_debug
(
"%s(), appending user data
\n
"
,
__func__
);
skb_put
(
skb
,
len
);
err
=
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
goto
out
;
...
...
net/iucv/af_iucv.c
浏览文件 @
6ce8e9ce
...
...
@@ -1122,7 +1122,7 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
}
if
(
iucv
->
transport
==
AF_IUCV_TRANS_HIPER
)
skb_reserve
(
skb
,
sizeof
(
struct
af_iucv_trans_hdr
)
+
ETH_HLEN
);
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
err
=
-
EFAULT
;
goto
fail
;
}
...
...
net/key/af_key.c
浏览文件 @
6ce8e9ce
...
...
@@ -3611,7 +3611,7 @@ static int pfkey_sendmsg(struct kiocb *kiocb,
goto
out
;
err
=
-
EFAULT
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
goto
out
;
hdr
=
pfkey_get_base_msg
(
skb
,
&
err
);
...
...
net/l2tp/l2tp_ip.c
浏览文件 @
6ce8e9ce
...
...
@@ -441,7 +441,7 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
*
((
__be32
*
)
skb_put
(
skb
,
4
))
=
0
;
/* Copy user data into skb */
rc
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
rc
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
rc
<
0
)
{
kfree_skb
(
skb
);
goto
error
;
...
...
net/l2tp/l2tp_ppp.c
浏览文件 @
6ce8e9ce
...
...
@@ -346,8 +346,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
skb_put
(
skb
,
2
);
/* Copy user data into skb */
error
=
memcpy_fromiovec
(
skb_put
(
skb
,
total_len
),
m
->
msg_iov
,
total_len
);
error
=
memcpy_from_msg
(
skb_put
(
skb
,
total_len
),
m
,
total_len
);
if
(
error
<
0
)
{
kfree_skb
(
skb
);
goto
error_put_sess_tun
;
...
...
net/llc/af_llc.c
浏览文件 @
6ce8e9ce
...
...
@@ -921,7 +921,7 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock,
skb
->
dev
=
llc
->
dev
;
skb
->
protocol
=
llc_proto_type
(
addr
->
sllc_arphrd
);
skb_reserve
(
skb
,
hdrlen
);
rc
=
memcpy_from
iovec
(
skb_put
(
skb
,
copied
),
msg
->
msg_iov
,
copied
);
rc
=
memcpy_from
_msg
(
skb_put
(
skb
,
copied
),
msg
,
copied
);
if
(
rc
)
goto
out
;
if
(
sk
->
sk_type
==
SOCK_DGRAM
||
addr
->
sllc_ua
)
{
...
...
net/netlink/af_netlink.c
浏览文件 @
6ce8e9ce
...
...
@@ -2325,7 +2325,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
NETLINK_CB
(
skb
).
flags
=
netlink_skb_flags
;
err
=
-
EFAULT
;
if
(
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
))
{
kfree_skb
(
skb
);
goto
out
;
}
...
...
net/netrom/af_netrom.c
浏览文件 @
6ce8e9ce
...
...
@@ -1113,7 +1113,7 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_put
(
skb
,
len
);
/* User data follows immediately after the NET/ROM transport header */
if
(
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
))
{
kfree_skb
(
skb
);
err
=
-
EFAULT
;
goto
out
;
...
...
net/nfc/llcp_commands.c
浏览文件 @
6ce8e9ce
...
...
@@ -665,7 +665,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
if
(
msg_data
==
NULL
)
return
-
ENOMEM
;
if
(
memcpy_from
iovec
(
msg_data
,
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
msg_data
,
msg
,
len
))
{
kfree
(
msg_data
);
return
-
EFAULT
;
}
...
...
@@ -731,7 +731,7 @@ int nfc_llcp_send_ui_frame(struct nfc_llcp_sock *sock, u8 ssap, u8 dsap,
if
(
msg_data
==
NULL
)
return
-
ENOMEM
;
if
(
memcpy_from
iovec
(
msg_data
,
msg
->
msg_iov
,
len
))
{
if
(
memcpy_from
_msg
(
msg_data
,
msg
,
len
))
{
kfree
(
msg_data
);
return
-
EFAULT
;
}
...
...
net/nfc/rawsock.c
浏览文件 @
6ce8e9ce
...
...
@@ -231,7 +231,7 @@ static int rawsock_sendmsg(struct kiocb *iocb, struct socket *sock,
if
(
skb
==
NULL
)
return
rc
;
rc
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
rc
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
rc
<
0
)
{
kfree_skb
(
skb
);
return
rc
;
...
...
net/packet/af_packet.c
浏览文件 @
6ce8e9ce
...
...
@@ -1676,7 +1676,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
if
(
len
<
hhlen
)
skb_reset_network_header
(
skb
);
}
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
err
)
goto
out_free
;
goto
retry
;
...
...
@@ -2446,8 +2446,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
len
-=
vnet_hdr_len
;
err
=
memcpy_fromiovec
((
void
*
)
&
vnet_hdr
,
msg
->
msg_iov
,
vnet_hdr_len
);
err
=
memcpy_from_msg
((
void
*
)
&
vnet_hdr
,
msg
,
vnet_hdr_len
);
if
(
err
<
0
)
goto
out_unlock
;
...
...
net/phonet/datagram.c
浏览文件 @
6ce8e9ce
...
...
@@ -109,7 +109,7 @@ static int pn_sendmsg(struct kiocb *iocb, struct sock *sk,
return
err
;
skb_reserve
(
skb
,
MAX_PHONET_HEADER
);
err
=
memcpy_from
iovec
((
void
*
)
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
((
void
*
)
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
err
<
0
)
{
kfree_skb
(
skb
);
return
err
;
...
...
net/phonet/pep.c
浏览文件 @
6ce8e9ce
...
...
@@ -1141,7 +1141,7 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk,
return
err
;
skb_reserve
(
skb
,
MAX_PHONET_HEADER
+
3
+
pn
->
aligned
);
err
=
memcpy_from
iovec
(
skb_put
(
skb
,
len
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_put
(
skb
,
len
),
msg
,
len
);
if
(
err
<
0
)
goto
outfree
;
...
...
net/rose/af_rose.c
浏览文件 @
6ce8e9ce
...
...
@@ -1121,7 +1121,7 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reset_transport_header
(
skb
);
skb_put
(
skb
,
len
);
err
=
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
);
err
=
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
return
err
;
...
...
net/sctp/sm_make_chunk.c
浏览文件 @
6ce8e9ce
...
...
@@ -1001,7 +1001,7 @@ struct sctp_chunk *sctp_make_abort_no_data(
/* Helper to create ABORT with a SCTP_ERROR_USER_ABORT error. */
struct
sctp_chunk
*
sctp_make_abort_user
(
const
struct
sctp_association
*
asoc
,
const
struct
msghdr
*
msg
,
struct
msghdr
*
msg
,
size_t
paylen
)
{
struct
sctp_chunk
*
retval
;
...
...
@@ -1018,7 +1018,7 @@ struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *asoc,
if
(
!
payload
)
goto
err_payload
;
err
=
memcpy_from
iovec
(
payload
,
msg
->
msg_iov
,
paylen
);
err
=
memcpy_from
_msg
(
payload
,
msg
,
paylen
);
if
(
err
<
0
)
goto
err_copy
;
}
...
...
net/x25/af_x25.c
浏览文件 @
6ce8e9ce
...
...
@@ -1170,7 +1170,7 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reset_transport_header
(
skb
);
skb_put
(
skb
,
len
);
rc
=
memcpy_from
iovec
(
skb_transport_header
(
skb
),
msg
->
msg_iov
,
len
);
rc
=
memcpy_from
_msg
(
skb_transport_header
(
skb
),
msg
,
len
);
if
(
rc
)
goto
out_kfree_skb
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录