[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA5qM4DaAHc2XyMwej7V3VzzoGa8uW+Rrg29C39tkeLrYnYhmQ@mail.gmail.com>
Date: Wed, 16 Feb 2022 08:43:34 -0800
From: Tong Zhang <ztong0001@...il.com>
To: Guenter Roeck <groeck@...gle.com>
Cc: Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/chrome: cros_ec: honor acpi=off
On Wed, Feb 16, 2022 at 8:12 AM Guenter Roeck <groeck@...gle.com> wrote:
>
> On Tue, Feb 15, 2022 at 10:26 PM Tong Zhang <ztong0001@...il.com> wrote:
> >
> > when acpi=off is provided in bootarg, kernel crash with
> >
> > BUG: kernel NULL pointer dereference, address: 0000000000000018
> > RIP: 0010:acpi_ns_walk_namespace+0x57/0x280
> > <TASK>
> > ? acpi_get_devices+0x140/0x140
> > cros_ec_lpc_init+0x25/0x100
> >
> > Driver should check if ACPI is disabled before calling acpi_get_devices(),
> > otherwise acpi_walk_namespace() will dereference null pointer since the
> > acpi_gbl_root_node is not initialized.
> > This is a common pattern and should be fixed in ACPI framework to prevent
> > such crash in the future, but since many drivers are already doing explicit
> > check(acpi_disable) we do the same thing here.
> >
Thanks for the comment. This is no longer an issue since the ACPI
patch I mentioned is staged in ACPICA tree.
https://github.com/acpica/acpica/commit/b1c3656ef4950098e530be68d4b589584f06cddc
Powered by blists - more mailing lists