diff options
author | Chris Wilson <[email protected]> | 2016-12-07 13:34:11 +0000 |
---|---|---|
committer | Jani Nikula <[email protected]> | 2016-12-20 16:29:26 +0200 |
commit | 057f803ff10742addd19a7c2fb6fb83940059a6c (patch) | |
tree | c7c8115376ce254dbffe408ddaa52c1277165f76 /tools/perf/util/trace-event-scripting.c | |
parent | dccf82ad1775f2b9c36ec85e25e39d88c7e86818 (diff) |
drm/i915: Reorder phys backing storage release
In commit a4f5ea64f0a8 ("drm/i915: Refactor object page API"), I
reordered the object->pages teardown to be more friendly wrt to a
separate obj->mm.lock. However, I overlooked the phys object and left it
with a dangling use-after-free of its phys_handle. Move the allocation
of the phys handle to get_pages and it release to put_pages to prevent
the invalid access and to improve symmetry.
v2: Add commentary about always aligning to page size.
Testcase: igt/drv_selftest/objects
Reported-by: Ville Syrjälä <[email protected]>
Fixes: a4f5ea64f0a8 ("drm/i915: Refactor object page API")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit dbb4351bab0a8440f6b02895c142bce6c30b7097)
Signed-off-by: Jani Nikula <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions