Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp756532pxk; Thu, 1 Oct 2020 13:03:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZiQi5bAyo/de/nV3HLV2OlWB98fWw6P4ESsEfqGWANapVL0Ap/DcOM5oVnaXcWWzfzQ4P X-Received: by 2002:aa7:db02:: with SMTP id t2mr9801309eds.95.1601582611899; Thu, 01 Oct 2020 13:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601582611; cv=none; d=google.com; s=arc-20160816; b=j7fbPwz7N6KsOuSuW1lFMdrQZcEyZLagHY9eUZl7uBuD9zQwkT3W22lCbvvaVeDWDs K39Zj6EzmRM5alTaPXhA93Fm0fyFL4aN5H/KaXF9MFnb7cNRhKHNwr/goo+FTpRSORmx lKU6YZaTzUGo+gpE2kFcWwje+xWDOB4r15KnbRE9OEvFQvUtiaF02JF66SRIAkofXeph aXU/JfdOWzs6CB2/6Sr2+YjyAn5KcoBLHI5BxB6dSZzjNL9RYHMRV5D/LfWoZKbYm9lA bO+5P3yCW3z9U6pNCABlCkgvPo5/enb+2tjcnaIbyx5uILGnPXLxSB181kvegU5/B4x3 mRWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lz5ldFg5e+sUFzsIM0C6Lw+jZrIFBbBE0sCoSufp1D0=; b=JT6Q1e6OBpOQ425Pzu/qQ+RLsbyDmDi7Zdtpj8FekXC5diN/4kHVfhGU0vy6p0TPwp j6UMl78M6saq/XV/5Hbh22pAPLExeCFO3bL/KbWlo/yOaklYZXRZQQo97vjFkscS8zuy xSfrRnWOjhhYJ1ZTXqm1aI1f9qI3/L5dpenrGn1NMvLJOIRTvnNxPRIQ7CfYbTdvRus9 BoZRrP0zRxu5Pa3q2e+7QhDNd9eNvxyWrHZC2qA80tQAiIvFEIZKbk3aT6fKuK9vPBrR viEmGb9MWa2MG5GFyqNNpRhzUUEbEAZSgQLx0rzNvxffC5iOaqqWxN1nTdna21RoK4pk 3TnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b=JmC1J8dw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si4520730ejx.162.2020.10.01.13.03.07; Thu, 01 Oct 2020 13:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b=JmC1J8dw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732274AbgJAUCK (ORCPT + 99 others); Thu, 1 Oct 2020 16:02:10 -0400 Received: from services.gouders.net ([141.101.32.176]:53158 "EHLO services.gouders.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729993AbgJAUCJ (ORCPT ); Thu, 1 Oct 2020 16:02:09 -0400 Received: from lena.gouders.net (ltea-047-066-024-155.pools.arcor-ip.net [47.66.24.155]) (authenticated bits=0) by services.gouders.net (8.14.8/8.14.8) with ESMTP id 091JtVtT012416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 1 Oct 2020 21:55:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1601582133; bh=+c1Qskew6XfuK4sFE9wvL98lkeAWXt2+Jq5q/gW488k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JmC1J8dwKII1dewZfDGkgW0nbtA2ZSDvkYbR953c4qSu11FVo6IX7DKUQL4nr74t2 ZUjifx35Emh1kZsfadniVSE4sS8DI/Tq9sjmfqP96Cm8ks4DcShIoXVV2WakjURJDw y5AEp5mkLVZke4CFCX56lmWMaYWSsZgOhae/AxsE= From: Dirk Gouders To: Alex Deucher Cc: Dirk Gouders , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Hawking Zhang , Evan Quan Subject: [PATCH 0/1] drm/amdgpu: fix NULL pointer dereference for Renoir Date: Thu, 1 Oct 2020 21:55:24 +0200 Message-Id: <20201001195525.3477-1-dirk@gouders.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alex Deucher writes: > On Wed, Sep 30, 2020 at 4:46 PM Dirk Gouders wrote: >> >> Commit c1cf79ca5ced46 (drm/amdgpu: use IP discovery table for renoir) >> introduced a NULL pointer dereference when booting with >> amdgpu.discovery=0. >> >> For amdgpu.discovery=0 that commit effectively removed the call of >> vega10_reg_base_init(adev), so I tested the correctness of the bisect >> session by restoring that function call for amdgpu_discovery == 0 and with >> that change, the NULL pointer dereference does not occur: >> > > Can I add your Signed-off-by? I did not expect the diff to be seen as a proposed patch, not even that it shows the correct fix. Anyway, I did my best to create a hopefully acceptable patch with some modification of the code that avoids "else" and an identical function call at two places in the code. I testet that patch with amdgpu.discovery={0,1} and together with the patch for the first issue you helped me with. The result is no more call traces. Thank you for your patient assistance with the two issues. Dirk > Thanks, > > Alex > >> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c >> index 84d811b6e48b..2e93c5e1e7e6 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c >> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c >> @@ -699,7 +699,8 @@ static void soc15_reg_base_init(struct amdgpu_device *adev) >> "fallback to legacy init method\n"); >> vega10_reg_base_init(adev); >> } >> - } >> + } else >> + vega10_reg_base_init(adev); >> break; >> case CHIP_VEGA20: >> vega20_reg_base_init(adev); >> >> Dirk >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx Dirk Gouders (1): drm/amdgpu: fix NULL pointer dereference for Renoir drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.26.2