mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
drm/ttm: request zeroed system memory pages for new TT buffer objects
commit ff02b13f68 upstream.
Fixes an information leak to userspace, we were handing out un-zeroed pages
for any newly created TTM_PL_TT buffer.
Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
6d7f52a7e6
commit
8215014c1d
|
|
@ -394,7 +394,8 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
|
|||
|
||||
if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
|
||||
if (bo->ttm == NULL) {
|
||||
ret = ttm_bo_add_ttm(bo, false);
|
||||
bool zero = !(old_man->flags & TTM_MEMTYPE_FLAG_FIXED);
|
||||
ret = ttm_bo_add_ttm(bo, zero);
|
||||
if (ret)
|
||||
goto out_err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user