Message ID | 20160929084953.GA24154@lnxartpec.se.axis.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 29/09/16 09:49, Rabin Vincent wrote: > On Wed, Sep 28, 2016 at 11:41:41AM -0600, Mathieu Poirier wrote: [...] >> Thanks you for reporting this Vankatesh, >> >> Sudeep and Suzuki, can you guys help me with this - I don't have an R1 >> to test with. > > I've seen this too, on other platforms. This should fix it: > > 8<----------- > From a9da7d7b47e67dd6ffcafddadb50e6f97503f296 Mon Sep 17 00:00:00 2001 > From: Rabin Vincent <rabinv@axis.com> > Date: Tue, 30 Aug 2016 08:54:21 +0200 > Subject: [PATCH] coresight: check for NULL child_name > > Connection child names associated to ports can sometimes be NULL, which > is the case when booting a system on QEMU or when the Coresight power > domain isn't switched on. fadf3a44e974 ("coresight: checking for NULL > string in coresight_name_match()") fixed one place to handle this but > the same check is needed in coresight_orphan_match() to prevent a crash > there. > Thanks Rabin, we have exact same fix in linux-next already.
On Thu, Sep 29, 2016 at 2:47 PM, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > On 29/09/16 09:49, Rabin Vincent wrote: >> >> On Wed, Sep 28, 2016 at 11:41:41AM -0600, Mathieu Poirier wrote: > > [...] > >>> Thanks you for reporting this Vankatesh, >>> >>> Sudeep and Suzuki, can you guys help me with this - I don't have an R1 >>> to test with. >> >> >> I've seen this too, on other platforms. This should fix it: >> >> 8<----------- >> From a9da7d7b47e67dd6ffcafddadb50e6f97503f296 Mon Sep 17 00:00:00 2001 >> From: Rabin Vincent <rabinv@axis.com> >> Date: Tue, 30 Aug 2016 08:54:21 +0200 >> Subject: [PATCH] coresight: check for NULL child_name >> >> Connection child names associated to ports can sometimes be NULL, which >> is the case when booting a system on QEMU or when the Coresight power >> domain isn't switched on. fadf3a44e974 ("coresight: checking for NULL >> string in coresight_name_match()") fixed one place to handle this but >> the same check is needed in coresight_orphan_match() to prevent a crash >> there. >> > > Thanks Rabin, we have exact same fix in linux-next already. Thanks Rabin/Sudeep for pointing out the patch. It is booting now with coresight enabled. > > -- > Regards, > Sudeep
On 29 September 2016 at 03:17, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > On 29/09/16 09:49, Rabin Vincent wrote: >> >> On Wed, Sep 28, 2016 at 11:41:41AM -0600, Mathieu Poirier wrote: > > [...] > >>> Thanks you for reporting this Vankatesh, >>> >>> Sudeep and Suzuki, can you guys help me with this - I don't have an R1 >>> to test with. >> >> >> I've seen this too, on other platforms. This should fix it: >> >> 8<----------- >> From a9da7d7b47e67dd6ffcafddadb50e6f97503f296 Mon Sep 17 00:00:00 2001 >> From: Rabin Vincent <rabinv@axis.com> >> Date: Tue, 30 Aug 2016 08:54:21 +0200 >> Subject: [PATCH] coresight: check for NULL child_name >> >> Connection child names associated to ports can sometimes be NULL, which >> is the case when booting a system on QEMU or when the Coresight power >> domain isn't switched on. fadf3a44e974 ("coresight: checking for NULL >> string in coresight_name_match()") fixed one place to handle this but >> the same check is needed in coresight_orphan_match() to prevent a crash >> there. >> > > Thanks Rabin, we have exact same fix in linux-next already. Sorry for the late reply - I am currently travelling. Sudeep is correct, we have this underway for the 4.9 cycle. Mathieu > > -- > Regards, > Sudeep
diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index d08d1ab..ceeaaea 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -725,7 +725,8 @@ static int coresight_orphan_match(struct device *dev, void *data) /* We have found at least one orphan connection */ if (conn->child_dev == NULL) { /* Does it match this newly added device? */ - if (!strcmp(dev_name(&csdev->dev), conn->child_name)) { + if (conn->child_name && + !strcmp(dev_name(&csdev->dev), conn->child_name)) { conn->child_dev = csdev; } else { /* This component still has an orphan */