public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
       [not found]   ` <CAJZ5v0j1TSF39Y5xt4T3OsTfOFjafUiXvQOAjedxV8sA0Mn6-w@mail.gmail.com>
@ 2018-08-13 17:52     ` Schmauss, Erik
  2018-08-13 18:51       ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Schmauss, Erik @ 2018-08-13 17:52 UTC (permalink / raw)
  To: Rafael J. Wysocki, stable; +Cc: ACPI Devel Maling List, Rafael J. Wysocki



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rafael@kernel.org]
> Sent: Sunday, August 12, 2018 2:47 AM
> To: Schmauss, Erik <erik.schmauss@intel.com>
> Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Rafael J. Wysocki
> <rjw@rjwysocki.net>
> Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope
> upon parse failure
> 
> On Fri, Aug 10, 2018 at 11:45 PM Erik Schmauss <erik.schmauss@intel.com>
> wrote:
> >
> > This change skips the entire length of opcodes that open a scope
> > (Device, Scope, Processor, etc) if the creation of the op fails. The
> > failure could be caused by various errors including AE_ALREADY_EXISTS
> > and AE_NOT_FOUND.
> >
> > Reported-by: Jeremy Linton <jeremy.linton@arm.com>
> > Tested-by: Jeremy Linton <jeremy.linton@arm.com>
> > Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
> 
> I think that we should propagate this fix to the "stable" kernel series, at least
> 4.17.y and newer.  Do you agree?

Yes, I agree.

Hi Greg, please add this to the stable kernel

> 
> > ---
> >  drivers/acpi/acpica/psloop.c | 17 +++++++++++------
> >  1 file changed, 11 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/acpi/acpica/psloop.c
> > b/drivers/acpi/acpica/psloop.c index 20b6142da183..358fcdd1f8a5 100644
> > --- a/drivers/acpi/acpica/psloop.c
> > +++ b/drivers/acpi/acpica/psloop.c
> > @@ -22,6 +22,7 @@
> >  #include "acdispat.h"
> >  #include "amlcode.h"
> >  #include "acconvert.h"
> > +#include "acnamesp.h"
> >
> >  #define _COMPONENT          ACPI_PARSER
> >  ACPI_MODULE_NAME("psloop")
> > @@ -527,12 +528,18 @@ acpi_status acpi_ps_parse_loop(struct
> acpi_walk_state *walk_state)
> >                                 if (ACPI_FAILURE(status)) {
> >                                         return_ACPI_STATUS(status);
> >                                 }
> > -                               if (walk_state->opcode == AML_SCOPE_OP) {
> > +                               if (acpi_ns_opens_scope
> > +                                   (acpi_ps_get_opcode_info
> > +
> > + (walk_state->opcode)->object_type)) {
> >                                         /*
> > -                                        * If the scope op fails to parse, skip the body of the
> > -                                        * scope op because the parse failure indicates that the
> > -                                        * device may not exist.
> > +                                        * If the scope/device op fails to parse, skip the body of
> > +                                        * the scope op because the parse failure indicates that
> > +                                        * the device may not exist.
> >                                          */
> > +                                       ACPI_ERROR((AE_INFO,
> > +                                                   "Skip parsing opcode %s",
> > +                                                   acpi_ps_get_opcode_name
> > +
> > + (walk_state->opcode)));
> >                                         walk_state->parser_state.aml =
> >                                             walk_state->aml + 1;
> >                                         walk_state->parser_state.aml =
> > @@ -540,8 +547,6 @@ acpi_status acpi_ps_parse_loop(struct
> acpi_walk_state *walk_state)
> >                                             (&walk_state->parser_state);
> >                                         walk_state->aml =
> >                                             walk_state->parser_state.aml;
> > -                                       ACPI_ERROR((AE_INFO,
> > -                                                   "Skipping Scope block"));
> >                                 }
> >
> >                                 continue;
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
  2018-08-13 17:52     ` [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failure Schmauss, Erik
@ 2018-08-13 18:51       ` Greg KH
  2018-08-13 21:35         ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-08-13 18:51 UTC (permalink / raw)
  To: Schmauss, Erik
  Cc: Rafael J. Wysocki, stable, ACPI Devel Maling List,
	Rafael J. Wysocki

On Mon, Aug 13, 2018 at 05:52:49PM +0000, Schmauss, Erik wrote:
> 
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rafael@kernel.org]
> > Sent: Sunday, August 12, 2018 2:47 AM
> > To: Schmauss, Erik <erik.schmauss@intel.com>
> > Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Rafael J. Wysocki
> > <rjw@rjwysocki.net>
> > Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope
> > upon parse failure
> > 
> > On Fri, Aug 10, 2018 at 11:45 PM Erik Schmauss <erik.schmauss@intel.com>
> > wrote:
> > >
> > > This change skips the entire length of opcodes that open a scope
> > > (Device, Scope, Processor, etc) if the creation of the op fails. The
> > > failure could be caused by various errors including AE_ALREADY_EXISTS
> > > and AE_NOT_FOUND.
> > >
> > > Reported-by: Jeremy Linton <jeremy.linton@arm.com>
> > > Tested-by: Jeremy Linton <jeremy.linton@arm.com>
> > > Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
> > 
> > I think that we should propagate this fix to the "stable" kernel series, at least
> > 4.17.y and newer.  Do you agree?
> 
> Yes, I agree.
> 
> Hi Greg, please add this to the stable kernel

What commit id should I add to the stable kernel?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
  2018-08-13 18:51       ` Greg KH
@ 2018-08-13 21:35         ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2018-08-13 21:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Schmauss, Erik, Rafael J. Wysocki, Stable, ACPI Devel Maling List,
	Rafael J. Wysocki

On Mon, Aug 13, 2018 at 8:51 PM Greg KH <greg@kroah.com> wrote:
>
> On Mon, Aug 13, 2018 at 05:52:49PM +0000, Schmauss, Erik wrote:
> >
> >
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rafael@kernel.org]
> > > Sent: Sunday, August 12, 2018 2:47 AM
> > > To: Schmauss, Erik <erik.schmauss@intel.com>
> > > Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Rafael J. Wysocki
> > > <rjw@rjwysocki.net>
> > > Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope
> > > upon parse failure
> > >
> > > On Fri, Aug 10, 2018 at 11:45 PM Erik Schmauss <erik.schmauss@intel.com>
> > > wrote:
> > > >
> > > > This change skips the entire length of opcodes that open a scope
> > > > (Device, Scope, Processor, etc) if the creation of the op fails. The
> > > > failure could be caused by various errors including AE_ALREADY_EXISTS
> > > > and AE_NOT_FOUND.
> > > >
> > > > Reported-by: Jeremy Linton <jeremy.linton@arm.com>
> > > > Tested-by: Jeremy Linton <jeremy.linton@arm.com>
> > > > Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
> > >
> > > I think that we should propagate this fix to the "stable" kernel series, at least
> > > 4.17.y and newer.  Do you agree?
> >
> > Yes, I agree.
> >
> > Hi Greg, please add this to the stable kernel
>
> What commit id should I add to the stable kernel?

It's not in the mainline yet.

I asked whether or not I should add a "Cc: stable" tag to this patch
when applying it. :-)

Cheers,
Rafael

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-14  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180810214304.13475-1-erik.schmauss@intel.com>
     [not found] ` <20180810214304.13475-6-erik.schmauss@intel.com>
     [not found]   ` <CAJZ5v0j1TSF39Y5xt4T3OsTfOFjafUiXvQOAjedxV8sA0Mn6-w@mail.gmail.com>
2018-08-13 17:52     ` [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failure Schmauss, Erik
2018-08-13 18:51       ` Greg KH
2018-08-13 21:35         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox