Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6c61403d
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看板
提交
6c61403d
编写于
4月 14, 2016
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-davem' of
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
上级
743b03a8
2da62906
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
18 deletion
+13
-18
drivers/target/iscsi/iscsi_target_util.c
drivers/target/iscsi/iscsi_target_util.c
+2
-3
include/linux/net.h
include/linux/net.h
+1
-2
net/socket.c
net/socket.c
+10
-13
未找到文件。
drivers/target/iscsi/iscsi_target_util.c
浏览文件 @
6c61403d
...
...
@@ -1283,9 +1283,8 @@ static int iscsit_do_rx_data(
iov_iter_kvec
(
&
msg
.
msg_iter
,
READ
|
ITER_KVEC
,
count
->
iov
,
count
->
iov_count
,
data
);
while
(
total_rx
<
data
)
{
rx_loop
=
sock_recvmsg
(
conn
->
sock
,
&
msg
,
(
data
-
total_rx
),
MSG_WAITALL
);
while
(
msg_data_left
(
&
msg
))
{
rx_loop
=
sock_recvmsg
(
conn
->
sock
,
&
msg
,
MSG_WAITALL
);
if
(
rx_loop
<=
0
)
{
pr_debug
(
"rx_loop: %d total_rx: %d
\n
"
,
rx_loop
,
total_rx
);
...
...
include/linux/net.h
浏览文件 @
6c61403d
...
...
@@ -218,8 +218,7 @@ int sock_create_lite(int family, int type, int proto, struct socket **res);
struct
socket
*
sock_alloc
(
void
);
void
sock_release
(
struct
socket
*
sock
);
int
sock_sendmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
);
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
size
,
int
flags
);
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
flags
);
struct
file
*
sock_alloc_file
(
struct
socket
*
sock
,
int
flags
,
const
char
*
dname
);
struct
socket
*
sockfd_lookup
(
int
fd
,
int
*
err
);
struct
socket
*
sock_from_file
(
struct
file
*
file
,
int
*
err
);
...
...
net/socket.c
浏览文件 @
6c61403d
...
...
@@ -709,17 +709,16 @@ void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
EXPORT_SYMBOL_GPL
(
__sock_recv_ts_and_drops
);
static
inline
int
sock_recvmsg_nosec
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
size
,
int
flags
)
int
flags
)
{
return
sock
->
ops
->
recvmsg
(
sock
,
msg
,
size
,
flags
);
return
sock
->
ops
->
recvmsg
(
sock
,
msg
,
msg_data_left
(
msg
)
,
flags
);
}
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
size
,
int
flags
)
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
flags
)
{
int
err
=
security_socket_recvmsg
(
sock
,
msg
,
size
,
flags
);
int
err
=
security_socket_recvmsg
(
sock
,
msg
,
msg_data_left
(
msg
)
,
flags
);
return
err
?:
sock_recvmsg_nosec
(
sock
,
msg
,
size
,
flags
);
return
err
?:
sock_recvmsg_nosec
(
sock
,
msg
,
flags
);
}
EXPORT_SYMBOL
(
sock_recvmsg
);
...
...
@@ -746,7 +745,7 @@ int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
iov_iter_kvec
(
&
msg
->
msg_iter
,
READ
|
ITER_KVEC
,
vec
,
num
,
size
);
set_fs
(
KERNEL_DS
);
result
=
sock_recvmsg
(
sock
,
msg
,
size
,
flags
);
result
=
sock_recvmsg
(
sock
,
msg
,
flags
);
set_fs
(
oldfs
);
return
result
;
}
...
...
@@ -796,7 +795,7 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to)
if
(
!
iov_iter_count
(
to
))
/* Match SYS5 behaviour */
return
0
;
res
=
sock_recvmsg
(
sock
,
&
msg
,
iov_iter_count
(
to
),
msg
.
msg_flags
);
res
=
sock_recvmsg
(
sock
,
&
msg
,
msg
.
msg_flags
);
*
to
=
msg
.
msg_iter
;
return
res
;
}
...
...
@@ -1696,7 +1695,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
msg
.
msg_iocb
=
NULL
;
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
flags
|=
MSG_DONTWAIT
;
err
=
sock_recvmsg
(
sock
,
&
msg
,
iov_iter_count
(
&
msg
.
msg_iter
),
flags
);
err
=
sock_recvmsg
(
sock
,
&
msg
,
flags
);
if
(
err
>=
0
&&
addr
!=
NULL
)
{
err2
=
move_addr_to_user
(
&
address
,
...
...
@@ -2073,7 +2072,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
*
iov
=
iovstack
;
unsigned
long
cmsg_ptr
;
int
total_len
,
len
;
int
len
;
ssize_t
err
;
/* kernel mode address */
...
...
@@ -2091,7 +2090,6 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
err
=
copy_msghdr_from_user
(
msg_sys
,
msg
,
&
uaddr
,
&
iov
);
if
(
err
<
0
)
return
err
;
total_len
=
iov_iter_count
(
&
msg_sys
->
msg_iter
);
cmsg_ptr
=
(
unsigned
long
)
msg_sys
->
msg_control
;
msg_sys
->
msg_flags
=
flags
&
(
MSG_CMSG_CLOEXEC
|
MSG_CMSG_COMPAT
);
...
...
@@ -2101,8 +2099,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
flags
|=
MSG_DONTWAIT
;
err
=
(
nosec
?
sock_recvmsg_nosec
:
sock_recvmsg
)(
sock
,
msg_sys
,
total_len
,
flags
);
err
=
(
nosec
?
sock_recvmsg_nosec
:
sock_recvmsg
)(
sock
,
msg_sys
,
flags
);
if
(
err
<
0
)
goto
out_freeiov
;
len
=
err
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录