summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-06-03 17:40:55 +0300
committerDave Airlie <airlied@redhat.com>2018-07-31 01:03:47 +0300
commit8456b99c16d193c4c3b7df305cf431e027f0189c (patch)
tree0931c9242fd0a17e8fe34fbad571a702950797fc /drivers/gpu/drm/udl
parentacb1872577b346bd15ab3a3f8dff780d6cca4b70 (diff)
downloadlinux-8456b99c16d193c4c3b7df305cf431e027f0189c.tar.xz
udl-kms: change down_interruptible to down
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>
Diffstat (limited to 'drivers/gpu/drm/udl')
-rw-r--r--drivers/gpu/drm/udl/udl_main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index d518de8f496b..1239decd46ff 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -170,18 +170,13 @@ static void udl_free_urb_list(struct drm_device *dev)
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);