lkml.org 
[lkml]   [2018]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 125/165] udl-kms: change down_interruptible to down
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Mikulas Patocka <mpatocka@redhat.com>

    commit 8456b99c16d193c4c3b7df305cf431e027f0189c upstream.

    If we leave urbs around, it causes not only leak, but also memory
    corruption. This patch fixes the function udl_free_urb_list, so that it
    always waits for all urbs that are in progress.

    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/gpu/drm/udl/udl_main.c | 7 +------
    1 file changed, 1 insertion(+), 6 deletions(-)

    --- a/drivers/gpu/drm/udl/udl_main.c
    +++ b/drivers/gpu/drm/udl/udl_main.c
    @@ -169,18 +169,13 @@ static void udl_free_urb_list(struct drm
    struct list_head *node;
    struct urb_node *unode;
    struct urb *urb;
    - int ret;
    unsigned long flags;

    DRM_DEBUG("Waiting for completes and freeing all render urbs\n");

    /* keep waiting and freeing, until we've got 'em all */
    while (count--) {
    -
    - /* Getting interrupted means a leak, but ok at shutdown*/
    - ret = down_interruptible(&udl->urbs.limit_sem);
    - if (ret)
    - break;
    + down(&udl->urbs.limit_sem);

    spin_lock_irqsave(&udl->urbs.lock, flags);


    \
     
     \ /
      Last update: 2018-09-03 19:46    [W:4.039 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site