[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1479082460.325635119@decadent.org.uk>
Date: Mon, 14 Nov 2016 00:14:20 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Rob Clark" <robdclark@...il.com>
Subject: [PATCH 3.16 227/346] drm/msm: use mutex_lock_interruptible for
submit ioctl
3.16.39-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Rob Clark <robdclark@...il.com>
commit b5b4c264df4d270819676b290cef9a11d04c35f0 upstream.
Be kinder to things that do lots of signal handling (ie. Xorg)
Signed-off-by: Rob Clark <robdclark@...il.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -339,12 +339,14 @@ int msm_ioctl_gem_submit(struct drm_devi
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_devi
out:
if (submit)
submit_cleanup(submit, !!ret);
+out_unlock:
mutex_unlock(&dev->struct_mutex);
return ret;
}
Powered by blists - more mailing lists