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
c6f08966
Commit
c6f08966
authored
May 25, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch compat_drm_dma() to drm_ioctl_kernel()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9e075680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioc32.c
+13
-25
No files found.
drivers/gpu/drm/drm_ioc32.c
View file @
c6f08966
...
...
@@ -584,38 +584,26 @@ static int compat_drm_dma(struct file *file, unsigned int cmd,
{
drm_dma32_t
d32
;
drm_dma32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_dma
__user
*
d
;
struct
drm_dma
d
;
int
err
;
if
(
copy_from_user
(
&
d32
,
argp
,
sizeof
(
d32
)))
return
-
EFAULT
;
d
=
compat_alloc_user_space
(
sizeof
(
*
d
));
if
(
!
d
)
return
-
EFAULT
;
if
(
__put_user
(
d32
.
context
,
&
d
->
context
)
||
__put_user
(
d32
.
send_count
,
&
d
->
send_count
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
send_indices
,
&
d
->
send_indices
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
send_sizes
,
&
d
->
send_sizes
)
||
__put_user
(
d32
.
flags
,
&
d
->
flags
)
||
__put_user
(
d32
.
request_count
,
&
d
->
request_count
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
request_indices
,
&
d
->
request_indices
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
request_sizes
,
&
d
->
request_sizes
))
return
-
EFAULT
;
err
=
drm_ioctl
(
file
,
DRM_IOCTL_DMA
,
(
unsigned
long
)
d
);
d
.
context
=
d32
.
context
;
d
.
send_count
=
d32
.
send_count
;
d
.
send_indices
=
compat_ptr
(
d32
.
send_indices
);
d
.
send_sizes
=
compat_ptr
(
d32
.
send_sizes
);
d
.
flags
=
d32
.
flags
;
d
.
request_count
=
d32
.
request_count
;
d
.
request_indices
=
compat_ptr
(
d32
.
request_indices
);
d
.
request_sizes
=
compat_ptr
(
d32
.
request_sizes
);
err
=
drm_ioctl_kernel
(
file
,
drm_legacy_dma_ioctl
,
&
d
,
DRM_AUTH
);
if
(
err
)
return
err
;
if
(
__get_user
(
d32
.
request_size
,
&
d
->
request_size
)
||
__get_user
(
d32
.
granted_count
,
&
d
->
granted_count
)
||
__put_user
(
d32
.
request_size
,
&
argp
->
request_size
)
||
__put_user
(
d32
.
granted_count
,
&
argp
->
granted_count
))
if
(
put_user
(
d
.
request_size
,
&
argp
->
request_size
)
||
put_user
(
d
.
granted_count
,
&
argp
->
granted_count
))
return
-
EFAULT
;
return
0
;
...
...
@@ -996,7 +984,7 @@ static struct {
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_SAREA_CTX
,
compat_drm_setsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_SAREA_CTX
,
compat_drm_getsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_RES_CTX
,
compat_drm_resctx
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_DMA32
)].
fn
=
compat_drm_dma
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_DMA
,
compat_drm_dma
)
,
#if IS_ENABLED(CONFIG_AGP)
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_ENABLE32
)].
fn
=
compat_drm_agp_enable
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_INFO32
)].
fn
=
compat_drm_agp_info
,
...
...
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