From patchwork Mon Apr 27 15:04:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 6281551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7B5E7BF4A6 for ; Mon, 27 Apr 2015 15:05:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D296F20109 for ; Mon, 27 Apr 2015 15:04:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B0964200C1 for ; Mon, 27 Apr 2015 15:04:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 061606E3CA; Mon, 27 Apr 2015 08:04:45 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F76A6E3CA for ; Mon, 27 Apr 2015 08:04:42 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pegasos-out.vodafone.de (Rohrpostix1 Daemon) with ESMTP id B0083260561; Mon, 27 Apr 2015 17:04:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at vodafone.de X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=no version=3.3.1 Authentication-Results: rohrpostix1.prod.vfnet.de (amavisd-new); dkim=pass header.i=@vodafone.de Received: from pegasos-out.vodafone.de ([127.0.0.1]) by localhost (rohrpostix1.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id akkLMRKt59Sw; Mon, 27 Apr 2015 17:04:39 +0200 (CEST) Received: from smtp-03.vodafone.de (xsmail-dmz9.prod.vfnet.de [10.215.254.40]) by pegasos-out.vodafone.de (Rohrpostix1 Daemon) with ESMTP id 23D0926013E; Mon, 27 Apr 2015 17:04:39 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.6.8 pegasos-out.vodafone.de 23D0926013E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafone.de; s=mail; t=1430147079; bh=kiUZ0T5seLAXfYtwbtEk8zwVa6mk5uTe8xFIcUrtkQE=; h=From:To:Cc:Subject:Date; b=svmi5RzHYNm0jvLxzR0sDFHW1HMAQfHCeX4Ue9fR8G/8/eceajFoHI54mviNBo24i 7/sQiGloZcquf5rnAEb9NlYLIOXK4rOyORK2Nww9Non+yj8JP9DrT5ex2+zxUQ6qEj Rrb2vnhhVO/34DfW6zsB/UxYzzhKaMeXyij6c70Q= X-Virus-Scanned: amavisd-new at vodafone.de Received: from smtp-03.vodafone.de ([127.0.0.1]) by localhost (xsmail-dmz9.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26nQPjzZqW4x; Mon, 27 Apr 2015 17:04:38 +0200 (CEST) From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: alexdeucher@gmail.com Subject: [PATCH 1/4] drm/radeon: fix lockup when BOs aren't part of the VM on release Date: Mon, 27 Apr 2015 17:04:34 +0200 Message-Id: <1430147077-5116-1-git-send-email-deathsimple@vodafone.de> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König If we unmap BOs before releasing them them the intervall tree locks up because we try to remove an entry not inside the tree. Signed-off-by: Christian König CC: stable@vger.kernel.org --- drivers/gpu/drm/radeon/radeon_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index 2a5a4a9..16d8e95 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c @@ -1107,7 +1107,8 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev, list_del(&bo_va->bo_list); mutex_lock(&vm->mutex); - interval_tree_remove(&bo_va->it, &vm->va); + if (bo_va->it.start || bo_va->it.last) + interval_tree_remove(&bo_va->it, &vm->va); spin_lock(&vm->status_lock); list_del(&bo_va->vm_status);