From patchwork Fri Jan 28 14:07:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Bullock X-Patchwork-Id: 515521 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0SHkbNe027360 for ; Fri, 28 Jan 2011 17:46:59 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E0EB9E9C4 for ; Fri, 28 Jan 2011 09:46:37 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D9AA9E7A1 for ; Fri, 28 Jan 2011 06:09:04 -0800 (PST) Received: by wwi17 with SMTP id 17so3176465wwi.12 for ; Fri, 28 Jan 2011 06:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references; bh=UxFzfrXkzhA7icOSAORUIptB8iunZLm5dzBqHs7zOA8=; b=ED9+RpgiUuLfgds/DiRCoKOlS5go+b/gxij0CaRJp6KFeWMLXpKKDiFdfRBuyOas7d M8hRblsTxuPipUycPotPEBAhf3bOEmw3qUWWbojNk3vRm4QsYXhAHTDPHLq3h5+1RymR 4XhSFqRacvIP7N8nfyYE399/B+TVgTrKcE4rM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=wutMzuQzlpArbuA9HM5h1vKPWQXMydroWaYQDa5j3/3JTHS6lcH2FZrMLwq93fjwaN Kywr9/iwwNbO2B4XuwWXcg4aMdZeRTXu0l+T/M/DONXalZB734rtniatBk9umkMV6yqo 6eaAI7wrJpfUcaJePjOLbHMizRyTvhnCAm778= Received: by 10.227.2.198 with SMTP id 6mr2726921wbk.74.1296223743144; Fri, 28 Jan 2011 06:09:03 -0800 (PST) Received: from localhost.localdomain ([82.152.210.104]) by mx.google.com with ESMTPS id b54sm4903722wer.21.2011.01.28.06.09.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 06:09:02 -0800 (PST) From: Matthew Bullock To: dri-devel@lists.freedesktop.org Subject: [PATCH] Fix broken locking in ttm_bo_swapout() Date: Fri, 28 Jan 2011 14:07:45 +0000 Message-Id: <1296223665-3686-1-git-send-email-matthew.bullock@tadpole.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <4D41312B.6090207@shipmail.org> References: <4D41312B.6090207@shipmail.org> X-Mailman-Approved-At: Fri, 28 Jan 2011 09:46:24 -0800 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 28 Jan 2011 17:46:59 +0000 (UTC) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index af61fc2..e4695db 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1803,6 +1803,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink) spin_unlock(&glob->lru_lock); (void) ttm_bo_cleanup_refs(bo, false, false, false); kref_put(&bo->list_kref, ttm_bo_release_list); + spin_lock(&glob->lru_lock); continue; }