Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753518AbcCGVHK (ORCPT ); Mon, 7 Mar 2016 16:07:10 -0500 Received: from mail-bn1bon0098.outbound.protection.outlook.com ([157.56.111.98]:5760 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752850AbcCGVHD (ORCPT ); Mon, 7 Mar 2016 16:07:03 -0500 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=amd.com; Subject: Re: Oops in 3.10.99 -- NULL pointer dereference in radeon_fence_ref To: Greg Kroah-Hartman , , linux-kernel , =?UTF-8?Q?Nicolai_H=c3=a4hnle?= References: <20160307025014.GA9499@mail.codepoet.org> <20160307204654.GB6545@kroah.com> CC: From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <56DDED67.2030801@amd.com> Date: Mon, 7 Mar 2016 22:06:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160307204654.GB6545@kroah.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.201.241.88] X-ClientProxiedBy: AM3PR07CA0013.eurprd07.prod.outlook.com (10.141.45.141) To SN1PR12MB0144.namprd12.prod.outlook.com (25.162.3.143) X-MS-Office365-Filtering-Correlation-Id: ac054fc2-01b2-4ac7-e54d-08d346cc6ca7 X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0144;2:TZACvJXDn1kFVp4osv1nXOXmEQ+xugRxutLb8QMaqHptI1UQqi0GIU8ImlNNLiKBVtZ972qoanMMjETPl1K39Leaogw1m3kk8S8LYNuGG24j0Xx+nhT5kF/k6Va63Uf7ejVHk7sNsFa2K3zubTbqCaHUgVIlRIONxLMfhLHt4YnPKhdUvNdcg4Z9WsaJUyv0;3:88rGrh7At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LFfV9mq4vUF1zFQI5yh7HHxjYAXiEwOHioQd+gXJowzFTHhczZe6w1N4DSyi2f0kP46VkTDewHHCvXea+VRf8/12mWoY1zXFfXB4gw8gTiXCZN2T5wX9W6Nbvlazbdf8jNs5LDigPMpOWNVjHV0bq/l7S8cwbTcYsPYagM9agSFMFWVTJPzAAGEpDVPc8/mc7jVK/55gtitE9H/L4kVVe2G+SGTNQanVJk0/ftLdsqq1gu17Mv01H7QtT/G+IYn8aDINSeTbwmgVQOc72Inv81eA2WnubyWl7AUBqGAgQxwBtcDztiAkQT4s58whpO6laT1Mp63/zSyaSp/NwVW0EnwXNgM5QIo1fxR0r1/cjW7SMJq46Bw/YHqE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:SN1PR12MB0144;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0144; X-Forefront-PRVS: 087474FBFA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(52044002)(24454002)(5423002)(87976001)(77096005)(36756003)(575784001)(86362001)(42186005)(65816999)(87266999)(81166005)(54356999)(83506001)(47776003)(76176999)(50986999)(50466002)(2906002)(5008740100001)(19580395003)(80316001)(59896002)(5004730100002)(117156001)(19580405001)(189998001)(5001770100001)(1096002)(92566002)(2870700001)(6116002)(3846002)(23746002)(4326007)(122386002)(4001350100001)(40100003)(66066001)(65956001)(33656002)(586003)(2950100001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0144;H:[192.168.137.20];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;SN1PR12MB0144;23:V+8PlqOyoX9GmjmXYDw8ISuF6Tiuq929LKw1T?= =?Windows-1252?Q?YCquAWeZz13b49pZkG1lxHashkXSA6sdQLAQzDDa+OIoQDgoxM+Mu/Do?= =?Windows-1252?Q?FMh3nbWrR13H59uHIQNBsQxUqIO9qbogb9iKJtsjW7RDS0nGeKUOFl9+?= =?Windows-1252?Q?CcsjAq90CJ/2FTnwqZ6sSmI/BBFVtBYHegDqA1eUuPCarTZUlb9S+6fN?= =?Windows-1252?Q?quyX+MUjdfm6/l3yh8tyIB675jHXQ0MEyly0KFlwRluj6cPuUJ5UU8zR?= =?Windows-1252?Q?BhHdNmqHYf8JyGKruZmJIUgHmKVMUReFKVTNt4FKKpXi8RdQhsN37W0v?= =?Windows-1252?Q?QTLwGsM3RumoxCRKreyExlGAW4hTBBVJbN5CIpAHwfDag/ykDYML8PFJ?= =?Windows-1252?Q?p5Zx9JpMVRM61HkNj2RFPoZUwYxyoYyCSCIMOf1t4JdnizpXwuFPS1+f?= =?Windows-1252?Q?AqaKrhC+q8gTjAhNYPzkYsKX18pjce16NsQXGZ/vebMUbzW/QccLVAH/?= =?Windows-1252?Q?C8JWglX6blfSqxiqpV34JuPKIjMME3zmF/nt8ZE0VNSSBxkm39oBC+RB?= =?Windows-1252?Q?w4EhcjbpCwPQ0lPOPGiUsHgWmxxejQ+hoeRdXGvvXQh36MpbP7PAFm30?= =?Windows-1252?Q?NcRbLwKGbER4GZz/bfsvVLWUAO6gmCqmrrBodI8dWwY20FMqCxMbvHhc?= =?Windows-1252?Q?AaBAhgCeh99EfX4HIelGgA/3QgvnGVX4qHUNAjBtXAJeL+VsL97ir5Wv?= =?Windows-1252?Q?mNwGJ0qaY0Bq3bs0qVZocYzLaKLZ4l8tyTuR22zRJas5gbhKXN6Oo36p?= =?Windows-1252?Q?yLvm4bOBxQr5GcGdapWIxp0tdPSq8f/xrd7K6z+3TcNu5XodeesVzveM?= =?Windows-1252?Q?5hVlO5+kVT6x4CRULBumVYFDr//gumOGldUkbww7S/aH5AoF/cJAN2uX?= =?Windows-1252?Q?150yqiviVfPaqBtVdHUbtrroecCSxlz406IygMZrpbvQoHEm42lJmZ51?= =?Windows-1252?Q?1c/JzRWh/UZuYPNJi8xqHHNvLgYrla4stHSMK2RcpLgsTwJePrYkmKr6?= =?Windows-1252?Q?7RNhV4LYEQpfZIweqW8Az05S8wCeiG/oT87YY2G+05eqRAeUXVwzEbLf?= =?Windows-1252?Q?s/q1HgjgqhVqGYWBwg9foX6Bpn55pRDnPQXONJE/CYjDR+a0YpobHcyK?= =?Windows-1252?Q?mXuSqhTHNLk/gmNozqsNRJXJIhgnPYCmu73SPlNR2f6Prv1Pdf1mLw5p?= =?Windows-1252?Q?X6JZWY5fVkTfNv9GC9XgeHKEdEIV+6rPC2nR/BZYYuLgoEDfFU116oZk?= =?Windows-1252?Q?xgb?= X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0144;5:NKp42QaDuuExWtWZejHQfJ22zkSs0NEvptg6vYg2tRbc99Q0LtQTaSHd8zb5YBwX68aTEhe0hz5bDtjMM7+2hk68VG8Xpnb1nxuDW32e7xGpM9QzXLjORpABbCJKKJqEkgNWZr+xG85oL/AzQ/rNyw==;24:xOBEISWgGXg+26iHd66shbzaK/9yUbbbTpPrKHRT4OvopYqqAjURw4qTEdimv/EQ4XGtBDuokuAm/UdY5TJZObZQQcvq5v1pDTAiSEzo1T4=;20:3MVW6XHhUFK4BD2D8m3Gwyot2+FCx+q7fyhBy5qRetpJCILryO4mDfImE1hOO+GwSrib+xXlPoFPuVPED9ya67C/d2R8cOMiIhmLEhhIvr9iS9Jf51yazHDbBqzQvAvYQw5vzNuYukWnPs+sLg9LSoXU6Ht74xLURQuVuAtUdcPk9liUC/zVeB3/oOYykb2Sojy/ab8LBnIcEY/Qg3TeQHzQqW/W1PwoIB0lK3XCOlGkK8LIcKOqBCRqlJuecn4H X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2016 21:06:58.7087 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0144 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2911 Lines: 62 Am 07.03.2016 um 21:46 schrieb Greg Kroah-Hartman: > On Sun, Mar 06, 2016 at 07:50:14PM -0700, Erik Andersen wrote: >> The following patch to radeon_sa_bo_new that >> went into 3.10.99 >> >> commit 8d5e1e5af0c667545c202e8f4051f77aa3bf31b7 >> Author: Nicolai Hähnle >> Date: Fri Feb 5 14:35:53 2016 -0500 >> drm/radeon: hold reference to fences in radeon_sa_bo_new >> commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb upstream. >> >> is triggering an Oops for me right when xscreensaver >> first began doing 3D stuff. After reverting this >> patch, xscreensaver has been happily running 3D stuff. >> >> Mar 6 18:00:43 sage kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 >> Mar 6 18:00:43 sage kernel: IP: [] radeon_fence_ref+0xd/0x50 [radeon] >> Mar 6 18:00:43 sage kernel: PGD 799e1d067 PUD 819186067 PMD 0 >> Mar 6 18:00:43 sage kernel: Oops: 0002 [#1] SMP >> >> Mar 6 18:00:43 sage kernel: Stack: >> Mar 6 18:00:43 sage kernel: ffffffffa01607ec ffff88108a4e8000 ffff88108a4e8000 ffff880888fbc000 >> Mar 6 18:00:43 sage kernel: ffff880ecbf11c78 0000fe2001000006 0000000000000000 0020000000000100 >> Mar 6 18:00:43 sage kernel: 00000000000d1200 ffff880ecbf11c14 0000000000000000 0000000000000000 >> Mar 6 18:00:43 sage kernel: Call Trace: >> Mar 6 18:00:43 sage kernel: [] ? radeon_sa_bo_new+0x2ac/0x4f0 [radeon] >> Mar 6 18:00:43 sage kernel: [] ? ttm_eu_list_ref_sub+0x3d/0x60 [ttm] >> Mar 6 18:00:43 sage kernel: [] radeon_ib_get+0x39/0x110 [radeon] >> Mar 6 18:00:43 sage kernel: [] radeon_cs_ioctl+0x69a/0xa70 [radeon] >> Mar 6 18:00:43 sage kernel: [] drm_ioctl+0x512/0x650 [drm] >> Mar 6 18:00:43 sage kernel: [] ? do_futex+0x111/0xc30 >> Mar 6 18:00:43 sage kernel: [] do_vfs_ioctl+0x305/0x520 >> Mar 6 18:00:43 sage kernel: [] ? vtime_account_user+0x69/0x80 >> Mar 6 18:00:43 sage kernel: [] SyS_ioctl+0x81/0xa0 >> Mar 6 18:00:43 sage kernel: [] tracesys+0xe1/0xe6 >> >> $ lspci | grep VGA >> 03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. >> [AMD/ATI] Redwood XT [Radeon HD 5670/5690/5730] > Next time, please cc: the people responsible for that patch as well... > > I can revert it, but maybe something else is going on here? Do you have > this same problem on 3.14, and 4.5-rc7? Hi Greg, yes that's an already known issue. Feel free to revert that one for now. I got it on my TODO list to provide a fixed patch for older kernel, but that can take a while. For the background Nicolais patch is correct, but assumes that radeon_fence_unref() can safely take NULL as the fence which is not the case for older kernels. Regards, Christian. > > thanks, > > greg k-h