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
9e075680
Commit
9e075680
authored
May 25, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch compat_drm_resctx() to drm_ioctl_kernel()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d7631e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioc32.c
+7
-13
No files found.
drivers/gpu/drm/drm_ioc32.c
View file @
9e075680
...
...
@@ -547,26 +547,20 @@ static int compat_drm_resctx(struct file *file, unsigned int cmd,
{
drm_ctx_res32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
drm_ctx_res32_t
res32
;
struct
drm_ctx_res
__user
*
res
;
struct
drm_ctx_res
res
;
int
err
;
if
(
copy_from_user
(
&
res32
,
argp
,
sizeof
(
res32
)))
return
-
EFAULT
;
res
=
compat_alloc_user_space
(
sizeof
(
*
res
));
if
(
!
res
)
return
-
EFAULT
;
if
(
__put_user
(
res32
.
count
,
&
res
->
count
)
||
__put_user
((
struct
drm_ctx
__user
*
)
(
unsigned
long
)
res32
.
contexts
,
&
res
->
contexts
))
return
-
EFAULT
;
err
=
drm_ioctl
(
file
,
DRM_IOCTL_RES_CTX
,
(
unsigned
long
)
res
);
res
.
count
=
res32
.
count
;
res
.
contexts
=
compat_ptr
(
res32
.
contexts
);
err
=
drm_ioctl_kernel
(
file
,
drm_legacy_resctx
,
&
res
,
DRM_AUTH
);
if
(
err
)
return
err
;
if
(
__get_user
(
res32
.
count
,
&
res
->
count
)
||
__put_user
(
res32
.
count
,
&
argp
->
count
))
res32
.
count
=
res
.
count
;
if
(
copy_to_user
(
argp
,
&
res32
,
sizeof
(
res32
)
))
return
-
EFAULT
;
return
0
;
...
...
@@ -1001,7 +995,7 @@ static struct {
[
DRM_IOCTL_NR
(
DRM_IOCTL_RM_MAP32
)].
fn
=
compat_drm_rmmap
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_SAREA_CTX
,
compat_drm_setsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_SAREA_CTX
,
compat_drm_getsareactx
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_RES_CTX32
)].
fn
=
compat_drm_resctx
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_RES_CTX
,
compat_drm_resctx
)
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_DMA32
)].
fn
=
compat_drm_dma
,
#if IS_ENABLED(CONFIG_AGP)
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_ENABLE32
)].
fn
=
compat_drm_agp_enable
,
...
...
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