Message ID | 1372330516-24433-1-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Thu, Jun 27, 2013 at 6:55 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > I found that a _WAK that does not return a package trips a null > pointer reference. Check for a null pointer before the > dereferencing of *ReturnObjectPtr. This is a hot fix workaround, > we should pick up the official fix in later version of ACPICA. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpica/source/components/namespace/nspredef.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c > index 941c3bd..e7bc55b 100644 > --- a/src/acpica/source/components/namespace/nspredef.c > +++ b/src/acpica/source/components/namespace/nspredef.c > @@ -237,6 +237,11 @@ AcpiNsCheckReturnValue ( > goto Exit; > } > > + if (!(*ReturnObjectPtr)) > + { > + Status = AE_AML_NO_RETURN_VALUE; > + goto Exit; > + } > /* > * For returned Package objects, check the type of all sub-objects. > * Note: Package may have been newly created by call above. > -- > 1.8.3.1 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 06/27/2013 06:55 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > I found that a _WAK that does not return a package trips a null > pointer reference. Check for a null pointer before the > dereferencing of *ReturnObjectPtr. This is a hot fix workaround, > we should pick up the official fix in later version of ACPICA. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpica/source/components/namespace/nspredef.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c > index 941c3bd..e7bc55b 100644 > --- a/src/acpica/source/components/namespace/nspredef.c > +++ b/src/acpica/source/components/namespace/nspredef.c > @@ -237,6 +237,11 @@ AcpiNsCheckReturnValue ( > goto Exit; > } > > + if (!(*ReturnObjectPtr)) > + { > + Status = AE_AML_NO_RETURN_VALUE; > + goto Exit; > + } > /* > * For returned Package objects, check the type of all sub-objects. > * Note: Package may have been newly created by call above. > Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c index 941c3bd..e7bc55b 100644 --- a/src/acpica/source/components/namespace/nspredef.c +++ b/src/acpica/source/components/namespace/nspredef.c @@ -237,6 +237,11 @@ AcpiNsCheckReturnValue ( goto Exit; } + if (!(*ReturnObjectPtr)) + { + Status = AE_AML_NO_RETURN_VALUE; + goto Exit; + } /* * For returned Package objects, check the type of all sub-objects. * Note: Package may have been newly created by call above.