From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Shiju Jose <shiju.jose@huawei.com>,
linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, rjw@rjwysocki.net, bp@alien8.de,
james.morse@arm.com, lenb@kernel.org, tony.luck@intel.com,
dan.carpenter@oracle.com, zhangliguang@linux.alibaba.com,
wangkefeng.wang@huawei.com, jroedel@suse.de,
yangyicong@hisilicon.com, jonathan.cameron@huawei.com,
tanxiaofei@huawei.com
Subject: Re: [PATCH v9 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors
Date: Wed, 17 Jun 2020 12:01:11 +0300 [thread overview]
Message-ID: <20200617090111.GC2428291@smile.fi.intel.com> (raw)
In-Reply-To: <20200616232019.GA1987909@bjorn-Precision-5520>
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@hisilicon.com>
> > + 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
prev parent reply other threads:[~2020-06-17 9:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 10:15 [PATCH v9 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors Shiju Jose
2020-06-15 12:00 ` Andy Shevchenko
2020-06-16 9:12 ` Shiju Jose
2020-06-16 9:30 ` Andy Shevchenko
2020-06-16 11:55 ` Shiju Jose
2020-06-16 12:41 ` Andy Shevchenko
2020-06-16 12:46 ` Shiju Jose
2020-06-16 23:20 ` Bjorn Helgaas
2020-06-17 9:01 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200617090111.GC2428291@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=dan.carpenter@oracle.com \
--cc=helgaas@kernel.org \
--cc=james.morse@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=jroedel@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=shiju.jose@huawei.com \
--cc=tanxiaofei@huawei.com \
--cc=tony.luck@intel.com \
--cc=wangkefeng.wang@huawei.com \
--cc=yangyicong@hisilicon.com \
--cc=zhangliguang@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox