lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] platform: chrome: Allocate sensorhub resource before claiming sensors
Hi,

On Mon, Apr 27, 2020 at 3:59 PM Gwendal Grignou <gwendal@chromium.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@chromium.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@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>

-Doug

\
 
 \ /
  Last update: 2020-04-29 01:03    [W:0.057 / U:3.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site