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] [day] [month] [year] [list]
Message-ID: <e4d13f5d-e4ea-492e-8209-59c3b6a0425e@amd.com>
Date: Fri, 16 Jan 2026 11:32:09 +0530
From: Vasant Hegde <vasant.hegde@....com>
To: Rakuram Eswaran <rakuram.e96@...il.com>
Cc: dan.carpenter@...aro.org, iommu@...ts.linux.dev, joro@...tes.org,
 linux-kernel@...r.kernel.org, lkp@...el.com, robin.murphy@....com,
 suravee.suthikulpanit@....com, will@...nel.org
Subject: Re: [PATCH] iommu: amd: Fix uninitialized dev_data on probe failure

Hi Rakuram,


On 1/12/2026 10:21 PM, Rakuram Eswaran wrote:
> Hi Vasant, 
> 
> On Mon, 12 Jan 2026 at 10:42, Vasant Hegde <vasant.hegde@....com> wrote:
>>
>> On 1/10/2026 3:39 PM, Jörg Rödel wrote:
>>> On Sun, Dec 21, 2025 at 11:04:16PM +0530, Rakuram Eswaran wrote:
>>>> diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
>>>> index 5d45795c367a..075125f0f52b 100644
>>>> --- a/drivers/iommu/amd/iommu.c
>>>> +++ b/drivers/iommu/amd/iommu.c
>>>> @@ -2426,7 +2426,7 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
>>>>              dev_err(dev, "Failed to initialize - trying to proceed anyway\n");
>>>>              iommu_dev = ERR_PTR(ret);
>>>>              iommu_ignore_device(iommu, dev);
>>>> -            goto out_err;
>>>> +            return iommu_dev;
>>>>      }
>>>
>>> This is not the right fix. It makes the function omit further initialization
>>> steps which are needed event when iommu_init_device() fails (which it only does
>>> on out-of-memory).
>>>
>>> The right fix is to initialize dev_data to NULL and check for that value before
>>> dereferencing it further down to keep the current logic.
>>
>> Ack. I think this function needs rewrite. PCIe device capability
>> check/enablement is scattered between this one and iommu_init_device(). I will
>> fix it as part of other PASID related fixes/cleanups.
>>
>> I think for now below fix is good enough.
>>
>> @Rakuram, @Joerg, let me know if you want me to send proper patch?
>>
> 
> Ok. 

Done. Thanks.

-Vasant


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ