diff options
| author | Matthew Auld <[email protected]> | 2020-01-17 13:24:13 +0000 |
|---|---|---|
| committer | Chris Wilson <[email protected]> | 2020-01-17 19:14:03 +0000 |
| commit | 8e78871bc1e5efec22c950d3fd24ddb63d4ff28a (patch) | |
| tree | d1cabcbff3a357384a034d8fc730ba723343b41c /tools/perf/scripts/python | |
| parent | 24860ad748688b1156472d734b88b5d8d32fa42a (diff) | |
drm/i915/userptr: fix size calculation
If we create a rather large userptr object(e.g 1ULL << 32) we might
shift past the type-width of num_pages: (int)num_pages << PAGE_SHIFT,
resulting in a totally bogus sg_table, which fortunately will eventually
manifest as:
gen8_ppgtt_insert_huge:463 GEM_BUG_ON(iter->sg->length < page_size)
kernel BUG at drivers/gpu/drm/i915/gt/gen8_ppgtt.c:463!
v2: more unsigned long
prefer I915_GTT_PAGE_SIZE
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Chris Wilson <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions