Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6eefcb2 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Marissa Wall
Browse files

BACKPORT: drm/fence: fix memory overwrite when setting out_fence fd



Currently if the userspace declares a int variable to store the out_fence
fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits
above the int variable on 64 bits systems.

Fix this by making the internal storage of out_fence in the kernel a s32
pointer.

Reported-by: default avatarChad Versace <chadversary@chromium.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Fixes: beaf5af48034 ("drm/fence: add out-fences support")
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-and-Tested-by: default avatarChad Versace <chadversary@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484317329-9293-1-git-send-email-gustavo@padovan.org


(cherry picked from commit 7e9081c5aac73b8a0bc22e0b3e7a12c3e9cf5256)
Signed-off-by: default avatarMarissa Wall <marissaw@google.com>

Change-Id: I67a3d3c27c46d454444c6f195407d6aad59f2343
parent 34e0b7db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment