[PATCH] drm/i915/gvt: To check whether workload scan and shadow has mutex hold
Zhenyu Wang
zhenyuw at linux.intel.com
Thu Jul 6 07:19:17 UTC 2017
On 2017.07.04 14:53:03 +0800, Ping Gao wrote:
> The function workload scan and shadow have to hold the drm.struct_mutex
> before called. To avoid misusing of this function, add a lockdep assert
> in it.
>
> Signed-off-by: Ping Gao <ping.a.gao at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/scheduler.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> index bd59c6d..ca1926d 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -201,6 +201,8 @@ int intel_gvt_scan_and_shadow_workload(struct intel_vgpu_workload *workload)
> struct intel_vgpu *vgpu = workload->vgpu;
> int ret;
>
> + lockdep_assert_held(&dev_priv->drm.struct_mutex);
> +
> if (workload->shadowed)
> return 0;
>
Applied, Thanks!
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170706/c5541dbe/attachment.sig>
More information about the intel-gvt-dev
mailing list