Re: [PATCH v9 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 16, 2020 at 06:20:19PM -0500, Bjorn Helgaas wrote:
> On Mon, Jun 15, 2020 at 11:15:52AM +0100, Shiju Jose wrote:
> > From: Yicong Yang <yangyicong@xxxxxxxxxxxxx>

> > +	if (!guid_equal((guid_t *)gdata->section_type, &hisi_pcie_sec_type) ||
> > +	    error_data->socket_id != socket)
> > +		return NOTIFY_DONE;
> 
> I think you have to verify the GUID first before you can even safely
> extract a struct hisi_pcie_error_private from the payload:
> 
>   if (!guid_equal(...))
>     return NOTIFY_DONE;

I just also noticed the ugly cast there.

So, please import GUID first (import_guid() I think is what you need).

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux