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
6c61403d
Commit
6c61403d
authored
Apr 14, 2016
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-davem' of
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
parents
743b03a8
2da62906
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+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
No files found.
drivers/target/iscsi/iscsi_target_util.c
View file @
6c61403d
...
@@ -1283,9 +1283,8 @@ static int iscsit_do_rx_data(
...
@@ -1283,9 +1283,8 @@ static int iscsit_do_rx_data(
iov_iter_kvec
(
&
msg
.
msg_iter
,
READ
|
ITER_KVEC
,
iov_iter_kvec
(
&
msg
.
msg_iter
,
READ
|
ITER_KVEC
,
count
->
iov
,
count
->
iov_count
,
data
);
count
->
iov
,
count
->
iov_count
,
data
);
while
(
total_rx
<
data
)
{
while
(
msg_data_left
(
&
msg
))
{
rx_loop
=
sock_recvmsg
(
conn
->
sock
,
&
msg
,
rx_loop
=
sock_recvmsg
(
conn
->
sock
,
&
msg
,
MSG_WAITALL
);
(
data
-
total_rx
),
MSG_WAITALL
);
if
(
rx_loop
<=
0
)
{
if
(
rx_loop
<=
0
)
{
pr_debug
(
"rx_loop: %d total_rx: %d
\n
"
,
pr_debug
(
"rx_loop: %d total_rx: %d
\n
"
,
rx_loop
,
total_rx
);
rx_loop
,
total_rx
);
...
...
include/linux/net.h
View file @
6c61403d
...
@@ -218,8 +218,7 @@ int sock_create_lite(int family, int type, int proto, struct socket **res);
...
@@ -218,8 +218,7 @@ int sock_create_lite(int family, int type, int proto, struct socket **res);
struct
socket
*
sock_alloc
(
void
);
struct
socket
*
sock_alloc
(
void
);
void
sock_release
(
struct
socket
*
sock
);
void
sock_release
(
struct
socket
*
sock
);
int
sock_sendmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
);
int
sock_sendmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
);
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
size
,
int
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
flags
);
int
flags
);
struct
file
*
sock_alloc_file
(
struct
socket
*
sock
,
int
flags
,
const
char
*
dname
);
struct
file
*
sock_alloc_file
(
struct
socket
*
sock
,
int
flags
,
const
char
*
dname
);
struct
socket
*
sockfd_lookup
(
int
fd
,
int
*
err
);
struct
socket
*
sockfd_lookup
(
int
fd
,
int
*
err
);
struct
socket
*
sock_from_file
(
struct
file
*
file
,
int
*
err
);
struct
socket
*
sock_from_file
(
struct
file
*
file
,
int
*
err
);
...
...
net/socket.c
View file @
6c61403d
...
@@ -709,17 +709,16 @@ void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
...
@@ -709,17 +709,16 @@ void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
EXPORT_SYMBOL_GPL
(
__sock_recv_ts_and_drops
);
EXPORT_SYMBOL_GPL
(
__sock_recv_ts_and_drops
);
static
inline
int
sock_recvmsg_nosec
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
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
sock_recvmsg
(
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
flags
)
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
);
EXPORT_SYMBOL
(
sock_recvmsg
);
...
@@ -746,7 +745,7 @@ int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
...
@@ -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
);
iov_iter_kvec
(
&
msg
->
msg_iter
,
READ
|
ITER_KVEC
,
vec
,
num
,
size
);
set_fs
(
KERNEL_DS
);
set_fs
(
KERNEL_DS
);
result
=
sock_recvmsg
(
sock
,
msg
,
size
,
flags
);
result
=
sock_recvmsg
(
sock
,
msg
,
flags
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
return
result
;
return
result
;
}
}
...
@@ -796,7 +795,7 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to)
...
@@ -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 */
if
(
!
iov_iter_count
(
to
))
/* Match SYS5 behaviour */
return
0
;
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
;
*
to
=
msg
.
msg_iter
;
return
res
;
return
res
;
}
}
...
@@ -1696,7 +1695,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
...
@@ -1696,7 +1695,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
msg
.
msg_iocb
=
NULL
;
msg
.
msg_iocb
=
NULL
;
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
flags
|=
MSG_DONTWAIT
;
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
)
{
if
(
err
>=
0
&&
addr
!=
NULL
)
{
err2
=
move_addr_to_user
(
&
address
,
err2
=
move_addr_to_user
(
&
address
,
...
@@ -2073,7 +2072,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
...
@@ -2073,7 +2072,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
*
iov
=
iovstack
;
struct
iovec
*
iov
=
iovstack
;
unsigned
long
cmsg_ptr
;
unsigned
long
cmsg_ptr
;
int
total_len
,
len
;
int
len
;
ssize_t
err
;
ssize_t
err
;
/* kernel mode address */
/* kernel mode address */
...
@@ -2091,7 +2090,6 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
...
@@ -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
);
err
=
copy_msghdr_from_user
(
msg_sys
,
msg
,
&
uaddr
,
&
iov
);
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
total_len
=
iov_iter_count
(
&
msg_sys
->
msg_iter
);
cmsg_ptr
=
(
unsigned
long
)
msg_sys
->
msg_control
;
cmsg_ptr
=
(
unsigned
long
)
msg_sys
->
msg_control
;
msg_sys
->
msg_flags
=
flags
&
(
MSG_CMSG_CLOEXEC
|
MSG_CMSG_COMPAT
);
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,
...
@@ -2101,8 +2099,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
if
(
sock
->
file
->
f_flags
&
O_NONBLOCK
)
flags
|=
MSG_DONTWAIT
;
flags
|=
MSG_DONTWAIT
;
err
=
(
nosec
?
sock_recvmsg_nosec
:
sock_recvmsg
)(
sock
,
msg_sys
,
err
=
(
nosec
?
sock_recvmsg_nosec
:
sock_recvmsg
)(
sock
,
msg_sys
,
flags
);
total_len
,
flags
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
out_freeiov
;
goto
out_freeiov
;
len
=
err
;
len
=
err
;
...
...
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