[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160818105452.GA8982@red-moon>
Date: Thu, 18 Aug 2016 11:55:04 +0100
From: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To: Dennis Chen <dennis.chen@....com>
Cc: iommu@...ts.linux-foundation.org,
Hanjun Guo <hanjun.guo@...aro.org>,
Tomasz Nowicki <tn@...ihalf.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Will Deacon <will.deacon@....com>,
Marc Zyngier <marc.zyngier@....com>,
Robin Murphy <robin.murphy@....com>,
Joerg Roedel <joro@...tes.org>, Jon Masters <jcm@...hat.com>,
Sinan Kaya <okaya@...eaurora.org>,
Nate Watterson <nwatters@...eaurora.org>,
linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
nd@....com
Subject: Re: [PATCH v4 09/15] drivers: acpi: iort: add support for ARM SMMU
platform devices creation
On Thu, Aug 18, 2016 at 06:50:07PM +0800, Dennis Chen wrote:
[...]
> > +static void __init iort_smmu_init(void)
> > +{
> > + struct acpi_iort_node *iort_node, *iort_end;
> > + struct acpi_table_iort *iort;
> > + struct fwnode_handle *fwnode;
> > + int i, ret;
> > +
> > + /*
> > + * table and iort will both point to the start of IORT table, but
> > + * have different struct types
> > + */
> > + iort = (struct acpi_table_iort *)iort_table;
> >
> If the firmware of a platform happens to miss the IORT table, then
> iort_table here will be a NULL pointer, in this case 'NULL pointer
> dereference' kernel panic will occur, if this is not an expected
> behavior then we can add a sanity check here to avoid this. IORT
> missing is a fatal error? I don't think so.
Yes, I've already fixed it, thanks for pointing that out.
Lorenzo
Powered by blists - more mailing lists