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: <BL1PR12MB51449BEDB5E2D3C27F300EC1F7A59@BL1PR12MB5144.namprd12.prod.outlook.com>
Date:   Tue, 7 Jun 2022 17:46:01 +0000
From:   "Deucher, Alexander" <Alexander.Deucher@....com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "Wong, Alice" <Shiwei.Wong@....com>,
        Sasha Levin <sashal@...nel.org>
Subject: RE: [PATCH 5.10 065/452] drm/amdgpu/ucode: Remove firmware load type
 check in amdgpu_ucode_free_bo

[Public]

> -----Original Message-----
> From: Deucher, Alexander
> Sent: Tuesday, June 7, 2022 1:33 PM
> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>; linux-
> kernel@...r.kernel.org
> Cc: stable@...r.kernel.org; Wong, Alice <Shiwei.Wong@....com>; Sasha
> Levin <sashal@...nel.org>
> Subject: RE: [PATCH 5.10 065/452] drm/amdgpu/ucode: Remove firmware
> load type check in amdgpu_ucode_free_bo
> 
> [Public]
> 
> > -----Original Message-----
> > From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Sent: Tuesday, June 7, 2022 12:59 PM
> > To: linux-kernel@...r.kernel.org
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>;
> > stable@...r.kernel.org; Wong, Alice <Shiwei.Wong@....com>; Deucher,
> > Alexander <Alexander.Deucher@....com>; Sasha Levin
> <sashal@...nel.org>
> > Subject: [PATCH 5.10 065/452] drm/amdgpu/ucode: Remove firmware load
> > type check in amdgpu_ucode_free_bo
> >
> > From: Alice Wong <shiwei.wong@....com>
> >
> > [ Upstream commit ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f ]
> >
> > When psp_hw_init failed, it will set the load_type to
> > AMDGPU_FW_LOAD_DIRECT.
> > During amdgpu_device_ip_fini, amdgpu_ucode_free_bo checks that
> > load_type is AMDGPU_FW_LOAD_DIRECT and skips deallocating fw_buf
> > causing memory leak.
> > Remove load_type check in amdgpu_ucode_free_bo.
> >
> > Signed-off-by: Alice Wong <shiwei.wong@....com>
> > Reviewed-by: Alex Deucher <alexander.deucher@....com>
> > Signed-off-by: Alex Deucher <alexander.deucher@....com>
> > Signed-off-by: Sasha Levin <sashal@...nel.org>
> 
> 
> I don't think this patch is relevant for kernels older than 5.19.  I shouldn't hurt
> anything however.

Nevermind, I see that Sasha backported the entire series that this patch depends on.

Alex

> 
> Alex
> 
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> > index b313ce4c3e97..30005ed8156f 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> > @@ -625,8 +625,7 @@ int amdgpu_ucode_create_bo(struct
> amdgpu_device
> > *adev)
> >
> >  void amdgpu_ucode_free_bo(struct amdgpu_device *adev)  {
> > -	if (adev->firmware.load_type != AMDGPU_FW_LOAD_DIRECT)
> > -		amdgpu_bo_free_kernel(&adev->firmware.fw_buf,
> > +	amdgpu_bo_free_kernel(&adev->firmware.fw_buf,
> >  		&adev->firmware.fw_buf_mc,
> >  		&adev->firmware.fw_buf_ptr);
> >  }
> > --
> > 2.35.1
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ