Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7eab8d9e
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看板
提交
7eab8d9e
编写于
4月 06, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new helper: memcpy_to_msg()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e1693718
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
13 addition
and
9 deletion
+13
-9
crypto/algif_hash.c
crypto/algif_hash.c
+1
-1
include/linux/skbuff.h
include/linux/skbuff.h
+5
-0
net/caif/caif_socket.c
net/caif/caif_socket.c
+1
-1
net/can/bcm.c
net/can/bcm.c
+1
-1
net/can/raw.c
net/can/raw.c
+1
-1
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+1
-1
net/ipv4/tcp.c
net/ipv4/tcp.c
+1
-1
net/irda/af_irda.c
net/irda/af_irda.c
+1
-1
net/packet/af_packet.c
net/packet/af_packet.c
+1
-2
未找到文件。
crypto/algif_hash.c
浏览文件 @
7eab8d9e
...
...
@@ -174,7 +174,7 @@ static int hash_recvmsg(struct kiocb *unused, struct socket *sock,
goto
unlock
;
}
err
=
memcpy_to
iovec
(
msg
->
msg_iov
,
ctx
->
result
,
len
);
err
=
memcpy_to
_msg
(
msg
,
ctx
->
result
,
len
);
unlock:
release_sock
(
sk
);
...
...
include/linux/skbuff.h
浏览文件 @
7eab8d9e
...
...
@@ -2692,6 +2692,11 @@ static inline int memcpy_from_msg(void *data, struct msghdr *msg, int len)
return
memcpy_fromiovec
(
data
,
msg
->
msg_iov
,
len
);
}
static
inline
int
memcpy_to_msg
(
struct
msghdr
*
msg
,
void
*
data
,
int
len
)
{
return
memcpy_toiovec
(
msg
->
msg_iov
,
data
,
len
);
}
struct
skb_checksum_ops
{
__wsum
(
*
update
)(
const
void
*
mem
,
int
len
,
__wsum
wsum
);
__wsum
(
*
combine
)(
__wsum
csum
,
__wsum
csum2
,
int
offset
,
int
len
);
...
...
net/caif/caif_socket.c
浏览文件 @
7eab8d9e
...
...
@@ -418,7 +418,7 @@ static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
}
release_sock
(
sk
);
chunk
=
min_t
(
unsigned
int
,
skb
->
len
,
size
);
if
(
memcpy_to
iovec
(
msg
->
msg_iov
,
skb
->
data
,
chunk
))
{
if
(
memcpy_to
_msg
(
msg
,
skb
->
data
,
chunk
))
{
skb_queue_head
(
&
sk
->
sk_receive_queue
,
skb
);
if
(
copied
==
0
)
copied
=
-
EFAULT
;
...
...
net/can/bcm.c
浏览文件 @
7eab8d9e
...
...
@@ -1555,7 +1555,7 @@ static int bcm_recvmsg(struct kiocb *iocb, struct socket *sock,
if
(
skb
->
len
<
size
)
size
=
skb
->
len
;
err
=
memcpy_to
iovec
(
msg
->
msg_iov
,
skb
->
data
,
size
);
err
=
memcpy_to
_msg
(
msg
,
skb
->
data
,
size
);
if
(
err
<
0
)
{
skb_free_datagram
(
sk
,
skb
);
return
err
;
...
...
net/can/raw.c
浏览文件 @
7eab8d9e
...
...
@@ -750,7 +750,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct socket *sock,
else
size
=
skb
->
len
;
err
=
memcpy_to
iovec
(
msg
->
msg_iov
,
skb
->
data
,
size
);
err
=
memcpy_to
_msg
(
msg
,
skb
->
data
,
size
);
if
(
err
<
0
)
{
skb_free_datagram
(
sk
,
skb
);
return
err
;
...
...
net/decnet/af_decnet.c
浏览文件 @
7eab8d9e
...
...
@@ -1760,7 +1760,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
if
((
chunk
+
copied
)
>
size
)
chunk
=
size
-
copied
;
if
(
memcpy_to
iovec
(
msg
->
msg_iov
,
skb
->
data
,
chunk
))
{
if
(
memcpy_to
_msg
(
msg
,
skb
->
data
,
chunk
))
{
rv
=
-
EFAULT
;
break
;
}
...
...
net/ipv4/tcp.c
浏览文件 @
7eab8d9e
...
...
@@ -1349,7 +1349,7 @@ static int tcp_recv_urg(struct sock *sk, struct msghdr *msg, int len, int flags)
if
(
len
>
0
)
{
if
(
!
(
flags
&
MSG_TRUNC
))
err
=
memcpy_to
iovec
(
msg
->
msg_iov
,
&
c
,
1
);
err
=
memcpy_to
_msg
(
msg
,
&
c
,
1
);
len
=
1
;
}
else
msg
->
msg_flags
|=
MSG_TRUNC
;
...
...
net/irda/af_irda.c
浏览文件 @
7eab8d9e
...
...
@@ -1466,7 +1466,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
}
chunk
=
min_t
(
unsigned
int
,
skb
->
len
,
size
);
if
(
memcpy_to
iovec
(
msg
->
msg_iov
,
skb
->
data
,
chunk
))
{
if
(
memcpy_to
_msg
(
msg
,
skb
->
data
,
chunk
))
{
skb_queue_head
(
&
sk
->
sk_receive_queue
,
skb
);
if
(
copied
==
0
)
copied
=
-
EFAULT
;
...
...
net/packet/af_packet.c
浏览文件 @
7eab8d9e
...
...
@@ -2949,8 +2949,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
vnet_hdr
.
flags
=
VIRTIO_NET_HDR_F_DATA_VALID
;
}
/* else everything is zero */
err
=
memcpy_toiovec
(
msg
->
msg_iov
,
(
void
*
)
&
vnet_hdr
,
vnet_hdr_len
);
err
=
memcpy_to_msg
(
msg
,
(
void
*
)
&
vnet_hdr
,
vnet_hdr_len
);
if
(
err
<
0
)
goto
out_free
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录