diff options
author | Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | 2022-06-14 21:43:46 +0300 |
---|---|---|
committer | Ramalingam C <ramalingam.c@intel.com> | 2022-06-27 21:16:35 +0300 |
commit | 7307e91bfcd0e3f123aab01b30557f93923b6d73 (patch) | |
tree | 3dd10c668bf173d4ada2fcf10921d5f819e66a6b /drivers/gpu/drm/i915/i915_request.h | |
parent | 7d8097073caa334ed6187a964645335324231e01 (diff) | |
download | linux-7307e91bfcd0e3f123aab01b30557f93923b6d73.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_request.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h index 28b1f9db5487..47041ec68df8 100644 --- a/drivers/gpu/drm/i915/i915_request.h +++ b/drivers/gpu/drm/i915/i915_request.h @@ -196,6 +196,8 @@ struct i915_request { struct dma_fence fence; spinlock_t lock; + struct drm_i915_private *i915; + /** * Context and ring buffer related to this request * Contexts are refcounted, so when this request is associated with a |