[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=XE5US4B3VE1OuF+bHTJc8QGG-c3PgQvT9KmPa-Hucoqw@mail.gmail.com>
Date: Tue, 28 Apr 2020 16:02:43 -0700
From: Doug Anderson <dianders@...omium.org>
To: Gwendal Grignou <gwendal@...omium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform: chrome: Allocate sensorhub resource before
claiming sensors
Hi,
On Mon, Apr 27, 2020 at 3:59 PM Gwendal Grignou <gwendal@...omium.org> wrote:
>
> Allocate callbacks array before enumerating the sensors:
> The probe routine for these sensors (for instance cros_ec_sensors_probe)
> can be called within the sensorhub probe routine
> (cros_ec_sensors_probe())
>
> Fixes: 145d59baff594 ("platform/chrome: cros_ec_sensorhub: Add FIFO support")
>
> Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
> ---
> drivers/platform/chrome/cros_ec_sensorhub.c | 80 +++++++++++--------
> .../platform/chrome/cros_ec_sensorhub_ring.c | 73 ++++++++++-------
> .../linux/platform_data/cros_ec_sensorhub.h | 1 +
> 3 files changed, 93 insertions(+), 61 deletions(-)
I haven't done any review of this patch, but before this patch on my
hardware enabling 'CONFIG_IIO_CROS_EC_SENSORS_CORE=y' would cause a
NULL pointer dereference at boot. After picking this patch the NULL
pointer dereference is gone. The details were in
<https://crbug.com/1074471>. I haven't done any other testing than
that, though. ;-) If it's useful:
Reported-by: Douglas Anderson <dianders@...omium.org>
Tested-by: Douglas Anderson <dianders@...omium.org>
-Doug
Powered by blists - more mailing lists