drm/i915: Do not dereference pointers from ring buffer in evict event
The TP_printk() should never dereference any pointers, because the ring
buffer can be read at some unknown time in the future. If a device no
longer exists, it can cause a kernel oops. This also makes this
event useless when saving the ring buffer in userspaces tools such as
perf and trace-cmd.
The i915_gem_evict_vm dereferences the vm pointer which may also not
exist when the ring buffer is read sometime in the future.
Link: http://lkml.kernel.org/r/[email protected]
Reported-by: Ramkumar Ramachandra <[email protected]>
Cc: [email protected] # 3.13+
Fixes: bcccff847d1f "drm/i915: trace vm eviction instead of everything"
Signed-off-by: Steven Rostedt <[email protected]>
[danvet: Try to make it actually compile]
Signed-off-by: Daniel Vetter <[email protected]>