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
nexedi
linux
Commits
30138384
Commit
30138384
authored
Jun 27, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compat_hdio_ioctl: get rid of set_fs()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
229b53c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
block/compat_ioctl.c
block/compat_ioctl.c
+6
-9
No files found.
block/compat_ioctl.c
View file @
30138384
...
...
@@ -79,19 +79,16 @@ static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev,
static
int
compat_hdio_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mode
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
mm_segment_t
old_fs
=
get_fs
();
unsigned
long
kval
;
unsigned
int
__user
*
uvp
;
unsigned
long
*
__user
p
;
int
error
;
set_fs
(
KERNEL_DS
);
p
=
compat_alloc_user_space
(
sizeof
(
unsigned
long
)
);
error
=
__blkdev_driver_ioctl
(
bdev
,
mode
,
cmd
,
(
unsigned
long
)(
&
kval
));
set_fs
(
old_fs
);
cmd
,
(
unsigned
long
)
p
);
if
(
error
==
0
)
{
uvp
=
compat_ptr
(
arg
);
if
(
put_user
(
kval
,
uvp
))
unsigned
int
__user
*
uvp
=
compat_ptr
(
arg
);
unsigned
long
v
;
if
(
get_user
(
v
,
p
)
||
put_user
(
v
,
uvp
))
error
=
-
EFAULT
;
}
return
error
;
...
...
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