Commit cc5fdd0c authored by Rob Clark's avatar Rob Clark Committed by Ben Hutchings

drm/msm: use mutex_lock_interruptible for submit ioctl

commit b5b4c264 upstream.

Be kinder to things that do lots of signal handling (ie. Xorg)
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 20402281
......@@ -339,12 +339,14 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
if (args->nr_cmds > MAX_CMDS)
return -EINVAL;
mutex_lock(&dev->struct_mutex);
ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
return ret;
submit = submit_create(dev, gpu, args->nr_bos);
if (!submit) {
ret = -ENOMEM;
goto out;
goto out_unlock;
}
ret = submit_lookup_objects(submit, args, file);
......@@ -422,6 +424,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
out:
if (submit)
submit_cleanup(submit, !!ret);
out_unlock:
mutex_unlock(&dev->struct_mutex);
return ret;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment