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
dbae740e
Commit
dbae740e
authored
May 24, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch compat_drm_markbufs() to drm_ioctl_kernel()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b36180a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioc32.c
+7
-11
No files found.
drivers/gpu/drm/drm_ioc32.c
View file @
dbae740e
...
@@ -348,21 +348,17 @@ static int compat_drm_markbufs(struct file *file, unsigned int cmd,
...
@@ -348,21 +348,17 @@ static int compat_drm_markbufs(struct file *file, unsigned int cmd,
{
{
drm_buf_desc32_t
b32
;
drm_buf_desc32_t
b32
;
drm_buf_desc32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
drm_buf_desc32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_buf_desc
__user
*
buf
;
struct
drm_buf_desc
__user
buf
;
if
(
copy_from_user
(
&
b32
,
argp
,
sizeof
(
b32
)))
if
(
copy_from_user
(
&
b32
,
argp
,
sizeof
(
b32
)))
return
-
EFAULT
;
return
-
EFAULT
;
buf
=
compat_alloc_user_space
(
sizeof
(
*
buf
));
buf
.
size
=
b32
.
size
;
if
(
!
buf
)
buf
.
low_mark
=
b32
.
low_mark
;
return
-
EFAULT
;
buf
.
high_mark
=
b32
.
high_mark
;
if
(
__put_user
(
b32
.
size
,
&
buf
->
size
)
||
__put_user
(
b32
.
low_mark
,
&
buf
->
low_mark
)
||
__put_user
(
b32
.
high_mark
,
&
buf
->
high_mark
))
return
-
EFAULT
;
return
drm_ioctl
(
file
,
DRM_IOCTL_MARK_BUFS
,
(
unsigned
long
)
buf
);
return
drm_ioctl_kernel
(
file
,
drm_legacy_markbufs
,
&
buf
,
DRM_AUTH
|
DRM_MASTER
|
DRM_ROOT_ONLY
);
}
}
typedef
struct
drm_buf_info32
{
typedef
struct
drm_buf_info32
{
...
@@ -1016,7 +1012,7 @@ static struct {
...
@@ -1016,7 +1012,7 @@ static struct {
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_UNIQUE
,
compat_drm_setunique
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_UNIQUE
,
compat_drm_setunique
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_ADD_MAP
,
compat_drm_addmap
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_ADD_MAP
,
compat_drm_addmap
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_ADD_BUFS
,
compat_drm_addbufs
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_ADD_BUFS
,
compat_drm_addbufs
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_MARK_BUFS32
)].
fn
=
compat_drm_markbufs
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_MARK_BUFS
,
compat_drm_markbufs
)
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_INFO_BUFS
,
compat_drm_infobufs
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_INFO_BUFS
,
compat_drm_infobufs
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_MAP_BUFS32
)].
fn
=
compat_drm_mapbufs
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_MAP_BUFS32
)].
fn
=
compat_drm_mapbufs
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_FREE_BUFS32
)].
fn
=
compat_drm_freebufs
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_FREE_BUFS32
)].
fn
=
compat_drm_freebufs
,
...
...
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