lkml.org 
[lkml]   [2016]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    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@gmail.com>

    commit b5b4c264df4d270819676b290cef9a11d04c35f0 upstream.

    Be kinder to things that do lots of signal handling (ie. Xorg)

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.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;
    }
    \
     
     \ /
      Last update: 2016-11-14 03:34    [W:4.665 / U:0.352 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site