lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171222180336.4250-1-colin.king@canonical.com>
Date:   Fri, 22 Dec 2017 18:03:36 +0000
From:   Colin King <colin.king@...onical.com>
To:     Christian Koenig <christian.koenig@....com>,
        Roger He <Hongbo.He@....com>, David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/ttm: fix double lock on glob->lru_lock

From: Colin Ian King <colin.king@...onical.com>

Lock glob->lru_lock is locked before the while loop and also
locked again at the end of the while loop; it appears that the
lock at the end of the while loop is a double lock that should
be removed.  CoverityScan picked this up with the introduction
of the referenced commit inthe Fixes tag, however, it may have
existed before this.  I've not been able to test this, but it
does look incorrect to me.

Detected by CoverityScan, CID#1268846 ("Double lock")

Fixes: 827ed2b06b05 ("drm/ttm: use try_lock in ttm_bo_delayed_delete again")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 60bb5c12b568..fb8d13a4bc94 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -595,7 +595,6 @@ static bool ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all)
 		}
 
 		kref_put(&bo->list_kref, ttm_bo_release_list);
-		spin_lock(&glob->lru_lock);
 	}
 	list_splice_tail(&removed, &bdev->ddestroy);
 	empty = list_empty(&bdev->ddestroy);
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ