drm/i915: Do not access rq->engine without a reference
authorNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Tue, 14 Jun 2022 18:43:46 +0000 (00:13 +0530)
committerRamalingam C <ramalingam.c@intel.com>
Mon, 27 Jun 2022 18:16:35 +0000 (23:46 +0530)
commit7307e91bfcd0e3f123aab01b30557f93923b6d73
tree3dd10c668bf173d4ada2fcf10921d5f819e66a6b
parent7d8097073caa334ed6187a964645335324231e01
drm/i915: Do not access rq->engine without a reference

In i915_fence_get_driver_name(), user may not hold a
reference to rq->engine. Hence do not access it. Instead,
store required device private pointer in 'rq->i915' and use it.

Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220614184348.23746-2-ramalingam.c@intel.com
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h