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
9e92662d
Commit
9e92662d
authored
May 24, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch compat_drm_getclient() to drm_ioctl_kernel()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5c7640ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
drivers/gpu/drm/drm_internal.h
drivers/gpu/drm/drm_internal.h
+1
-0
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioc32.c
+12
-17
drivers/gpu/drm/drm_ioctl.c
drivers/gpu/drm/drm_ioctl.c
+1
-1
No files found.
drivers/gpu/drm/drm_internal.h
View file @
9e92662d
...
...
@@ -145,3 +145,4 @@ static inline int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc)
#endif
drm_ioctl_t
drm_version
;
drm_ioctl_t
drm_getunique
;
drm_ioctl_t
drm_getclient
;
drivers/gpu/drm/drm_ioc32.c
View file @
9e92662d
...
...
@@ -263,29 +263,24 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd,
{
drm_client32_t
c32
;
drm_client32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_client
__user
*
client
;
int
idx
,
err
;
struct
drm_client
client
;
int
err
;
if
(
get_user
(
idx
,
&
argp
->
idx
))
if
(
copy_from_user
(
&
c32
,
argp
,
sizeof
(
c32
)
))
return
-
EFAULT
;
client
=
compat_alloc_user_space
(
sizeof
(
*
client
));
if
(
!
client
)
return
-
EFAULT
;
if
(
__put_user
(
idx
,
&
client
->
idx
))
return
-
EFAULT
;
client
.
idx
=
c32
.
idx
;
err
=
drm_ioctl
(
file
,
DRM_IOCTL_GET_CLIENT
,
(
unsigned
long
)
client
);
err
=
drm_ioctl
_kernel
(
file
,
drm_getclient
,
&
client
,
DRM_UNLOCKED
);
if
(
err
)
return
err
;
if
(
__get_user
(
c32
.
idx
,
&
client
->
idx
)
||
__get_user
(
c32
.
auth
,
&
client
->
auth
)
||
__get_user
(
c32
.
pid
,
&
client
->
pid
)
||
__get_user
(
c32
.
uid
,
&
client
->
uid
)
||
__get_user
(
c32
.
magic
,
&
client
->
magic
)
||
__get_user
(
c32
.
iocs
,
&
client
->
iocs
))
return
-
EFAULT
;
c32
.
idx
=
client
.
idx
;
c32
.
auth
=
client
.
auth
;
c32
.
pid
=
client
.
pid
;
c32
.
uid
=
client
.
uid
;
c32
.
magic
=
client
.
magic
;
c32
.
iocs
=
client
.
iocs
;
if
(
copy_to_user
(
argp
,
&
c32
,
sizeof
(
c32
)))
return
-
EFAULT
;
...
...
@@ -1037,7 +1032,7 @@ static struct {
DRM_IOCTL32_DEF
(
DRM_IOCTL_VERSION
,
compat_drm_version
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_UNIQUE
,
compat_drm_getunique
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_MAP
,
compat_drm_getmap
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_GET_CLIENT32
)].
fn
=
compat_drm_getclient
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_CLIENT
,
compat_drm_getclient
)
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_GET_STATS32
)].
fn
=
compat_drm_getstats
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_UNIQUE
,
compat_drm_setunique
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_ADD_MAP32
)].
fn
=
compat_drm_addmap
,
...
...
drivers/gpu/drm/drm_ioctl.c
View file @
9e92662d
...
...
@@ -172,7 +172,7 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
* Searches for the client with the specified index and copies its information
* into userspace
*/
static
int
drm_getclient
(
struct
drm_device
*
dev
,
void
*
data
,
int
drm_getclient
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
{
struct
drm_client
*
client
=
data
;
...
...
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