Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755583AbcCPTmB (ORCPT ); Wed, 16 Mar 2016 15:42:01 -0400 Received: from mail-bn1bon0080.outbound.protection.outlook.com ([157.56.111.80]:43648 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754315AbcCPTl7 (ORCPT ); Wed, 16 Mar 2016 15:41:59 -0400 Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Subject: Re: [PATCH 3.12 36/58] Revert "drm/radeon: hold reference to fences in radeon_sa_bo_new" To: Jiri Slaby , References: CC: , =?UTF-8?Q?Christian_K=c3=b6nig?= From: =?UTF-8?Q?Nicolai_H=c3=a4hnle?= Message-ID: <56E9B6EF.8070007@amd.com> Date: Wed, 16 Mar 2016 14:41:35 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [190.43.70.221] X-ClientProxiedBy: BY2PR21CA0022.namprd21.prod.outlook.com (25.162.74.160) To BN4PR12MB0737.namprd12.prod.outlook.com (25.164.58.23) X-MS-Office365-Filtering-Correlation-Id: 96ad95d1-5fe7-4ec3-3a47-08d34dd3085e X-Microsoft-Exchange-Diagnostics: 1;BN4PR12MB0737;2:HyX2qSQrzwOtaN/7EAHnaHai31uOsxPUmJbcMaSgvRdftX13CYNcIlBFv9Zd+DFvGFbvuAbzLiaSS6RpZGVafrbKqkJP4LmUwWT+sfbzuIrYa4BukVn8tAlBlofyFOx/japX5qAo3BCz5P4B9JdxRjGmL39xQvRfV+pOiai1XQGcB5BAz1o3fxoUEoyJeH4K;3:oviUlNzl/Y3YvJfc8w4PI5E3nM4wd63vgDPVcStwVtB7zLRSUc4MbJi6CiGn2Wbd+TvE9cCm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nDXOpkBFVP+WixycLYnvjPPEejym+ZDXRYt8JWPP+Dvs6eWq2U18Y2t8Pvs85YE6gw/BZ6XYVB3/Q7mRvLfDEAWFMaTrxe4Kn9VucN623GFbWnTsZ6uBypgZ3xkEnOtO9AXSlmRctN2jGzc8u8DpIofPQr/pteBiRpeNKYER8tKyZ7h3cBEeVHrOIzO6jEKaOIDkP4cWY0sd525g2611MEIioJ/a19z2YJDzjbWWNmNeI8AVTMqyNG5FykOpyRWqAJRyxyIQSa1TTzTg1r1i+3SdAh3R+cU2XdoL3jjjWRNINSEOjoCcST33/icG2Tp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN4PR12MB0737;BCL:0;PCL:0;RULEID:;SRVR:BN4PR12MB0737; X-Forefront-PRVS: 08831F51DC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(164054003)(24454002)(3846002)(586003)(83506001)(54356999)(33656002)(47776003)(2950100001)(5004730100002)(77096005)(2906002)(87266999)(66066001)(50986999)(19580395003)(5008740100001)(50466002)(2870700001)(117156001)(6116002)(92566002)(189998001)(80316001)(23676002)(76176999)(81166005)(65816999)(86362001)(36756003)(64126003)(575784001)(5001770100001)(42186005)(4326007)(1096002)(4001350100001)(19580405001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR12MB0737;H:[192.168.7.120];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjRQUjEyTUIwNzM3OzIzOmZjbEtvRTBQdCtYUWtLRGppTGRzYStiT0Rv?= =?utf-8?B?U1FxdUFlWnIzQXVMaTFvM1ptQ2F4M2JQbDkySVNSanA2T1RMclBXTzQrTUx2?= =?utf-8?B?VkJ3cVpJR1VhT0Z2WXR0V0ovRjBHMWt5b3R0ZGFZMEZ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O5xra0aPiULu+T3a8hqymHjXRZUn+I3h4UBpj6FYAkm X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2016 19:41:54.0389 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0737 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1850 Lines: 49 This is fine. Please consider applying the corrected backport that I sent around yesterday. Apologies for the mess - an unfortunate interaction with older code, plus then some stable branches already reverted the original backport while others didn't. The best way forward right now is to revert the original backport (as indicated in your mail) and apply the fixed one. Thanks, Nicolai On 16.03.2016 05:59, Jiri Slaby wrote: > 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) { >