Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966831AbcCPLHN (ORCPT ); Wed, 16 Mar 2016 07:07:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:47515 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966619AbcCPLAB (ORCPT ); Wed, 16 Mar 2016 07:00:01 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Slaby , =?UTF-8?q?Nicolai=20H=C3=A4hnle?= , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH 3.12 36/58] Revert "drm/radeon: hold reference to fences in radeon_sa_bo_new" Date: Wed, 16 Mar 2016 11:59:21 +0100 Message-Id: X-Mailer: git-send-email 2.7.3 In-Reply-To: <377b71e18f20d69b0df301ce7040554f40ba9651.1458125909.git.jslaby@suse.cz> References: <377b71e18f20d69b0df301ce7040554f40ba9651.1458125909.git.jslaby@suse.cz> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 38 3.12-stable review patch. If anyone has any objections, please let me know. =============== This reverts commit 40df18b49e7fe4ec9ab93f68c33661ee291149bd, commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb upstream. It causes oopses: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: [] radeon_fence_ref+0xd/0x50 [radeon] Signed-off-by: Jiri Slaby Cc: Nicolai Hähnle Cc: Christian König --- drivers/gpu/drm/radeon/radeon_sa.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index bb166849aa6e..f0bac68254b7 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c @@ -349,13 +349,8 @@ int radeon_sa_bo_new(struct radeon_device *rdev, /* see if we can skip over some allocations */ } while (radeon_sa_bo_next_hole(sa_manager, fences, tries)); - for (i = 0; i < RADEON_NUM_RINGS; ++i) - radeon_fence_ref(fences[i]); - spin_unlock(&sa_manager->wq.lock); r = radeon_fence_wait_any(rdev, fences, false); - for (i = 0; i < RADEON_NUM_RINGS; ++i) - radeon_fence_unref(&fences[i]); spin_lock(&sa_manager->wq.lock); /* if we have nothing to wait for block */ if (r == -ENOENT && block) { -- 2.7.3