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
fdc81f45
Commit
fdc81f45
authored
Mar 21, 2015
by
Al Viro
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sg_start_req(): use import_iovec()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
451a2886
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
drivers/scsi/sg.c
drivers/scsi/sg.c
+5
-11
No files found.
drivers/scsi/sg.c
View file @
fdc81f45
...
...
@@ -1744,21 +1744,15 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
md
->
from_user
=
0
;
}
if
(
unlikely
(
iov_count
>
MAX_UIOVEC
))
return
-
EINVAL
;
if
(
iov_count
)
{
int
size
=
sizeof
(
struct
iovec
)
*
iov_count
;
struct
iovec
*
iov
;
struct
iovec
*
iov
=
NULL
;
struct
iov_iter
i
;
iov
=
memdup_user
(
hp
->
dxferp
,
size
);
if
(
IS_ERR
(
iov
)
)
return
PTR_ERR
(
iov
)
;
res
=
import_iovec
(
rw
,
hp
->
dxferp
,
iov_count
,
0
,
&
iov
,
&
i
);
if
(
res
<
0
)
return
res
;
iov_iter_init
(
&
i
,
rw
,
iov
,
iov_count
,
min_t
(
size_t
,
hp
->
dxfer_len
,
iov_length
(
iov
,
iov_count
)));
iov_iter_truncate
(
&
i
,
hp
->
dxfer_len
);
res
=
blk_rq_map_user_iov
(
q
,
rq
,
md
,
&
i
,
GFP_ATOMIC
);
kfree
(
iov
);
...
...
Kirill Smelkov
@kirr
mentioned in commit
2558b5b7
·
Jun 08, 2016
mentioned in commit
2558b5b7
mentioned in commit 2558b5b7ab218804ee03f5f13c0d3036e409dabe
Toggle commit list
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