diff mbox

[libdrm] drm: Fix 32-bit drmSyncobjWait.

Message ID 20180206102323.123404-1-bas@basnieuwenhuizen.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Bas Nieuwenhuizen Feb. 6, 2018, 10:23 a.m. UTC
Otherwise we get an EFAULT, at least on a 64-bit kernel.

Fixes: 2048a9e7 "drm: add drmSyncobjWait wrapper"
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian König Feb. 6, 2018, 10:47 a.m. UTC | #1
Am 06.02.2018 um 11:23 schrieb Bas Nieuwenhuizen:
> Otherwise we get an EFAULT, at least on a 64-bit kernel.
>
> Fixes: 2048a9e7 "drm: add drmSyncobjWait wrapper"

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   xf86drm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 74b4e230..1e87610b 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -4271,7 +4271,7 @@ int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
>       int ret;
>   
>       memclear(args);
> -    args.handles = (intptr_t)handles;
> +    args.handles = (uintptr_t)handles;
>       args.timeout_nsec = timeout_nsec;
>       args.count_handles = num_handles;
>       args.flags = flags;
diff mbox

Patch

diff --git a/xf86drm.c b/xf86drm.c
index 74b4e230..1e87610b 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -4271,7 +4271,7 @@  int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
     int ret;
 
     memclear(args);
-    args.handles = (intptr_t)handles;
+    args.handles = (uintptr_t)handles;
     args.timeout_nsec = timeout_nsec;
     args.count_handles = num_handles;
     args.flags = flags;