lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ghh7rdy9hg.fsf@gouders.net>
Date:   Thu, 01 Oct 2020 22:30:51 +0200
From:   Dirk Gouders <dirk@...ders.net>
To:     Alex Deucher <alexdeucher@...il.com>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König 
        <christian.koenig@....com>, linux-kernel@...r.kernel.org,
        amd-gfx@...ts.freedesktop.org,
        Hawking Zhang <Hawking.Zhang@....com>,
        Evan Quan <evan.quan@....com>
Subject: Re: [PATCH 1/1] drm/amdgpu: fix NULL pointer dereference for Renoir

Dirk Gouders <dirk@...ders.net> writes:

> Commit c1cf79ca5ced46 (drm/amdgpu: use IP discovery table for renoir)
> introduced a NULL pointer dereference when booting with
> amdgpu.discovery=0, because it removed the call of vega10_reg_base_init()
> for that case.
>
> Fix this by calling that funcion if amdgpu_discovery == 0 in addition to
> the case that amdgpu_discovery_reg_base_init() failed.
>
> Fixes: c1cf79ca5ced46 (drm/amdgpu: use IP discovery table for renoir)
> Signed-off-by: Dirk Gouders <dirk@...ders.net>
> Cc: Hawking Zhang <Hawking.Zhang@....com>
> Cc: Evan Quan <evan.quan@....com>
> ---
>  drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
> index 84d811b6e48b..f8cb62b326d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -694,12 +694,12 @@ static void soc15_reg_base_init(struct amdgpu_device *adev)
>  		 * it doesn't support SRIOV. */
>  		if (amdgpu_discovery) {
>  			r = amdgpu_discovery_reg_base_init(adev);
> -			if (r) {
> -				DRM_WARN("failed to init reg base from ip discovery table, "
> -					 "fallback to legacy init method\n");
> -				vega10_reg_base_init(adev);
> -			}
> +			if (r == 0)
> +			  break;

Grrr, wrong indentation here.
But I will wait for your review before v1.

Dirk


> +			DRM_WARN("failed to init reg base from ip discovery table, "
> +				 "fallback to legacy init method\n");
>  		}
> +		vega10_reg_base_init(adev);
>  		break;
>  	case CHIP_VEGA20:
>  		vega20_reg_base_init(adev);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ