Re: [PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-19 Thread Nick Crews
On Tue, Jun 18, 2019 at 11:30 PM Dan Carpenter wrote: > > On Tue, Jun 18, 2019 at 04:39:24PM +0100, Colin King wrote: > > diff --git a/drivers/platform/chrome/wilco_ec/event.c > > b/drivers/platform/chrome/wilco_ec/event.c > > index c975b76e6255..e251a989b152 100644 > > ---

Re: [PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-18 Thread Dan Carpenter
On Tue, Jun 18, 2019 at 04:39:24PM +0100, Colin King wrote: > diff --git a/drivers/platform/chrome/wilco_ec/event.c > b/drivers/platform/chrome/wilco_ec/event.c > index c975b76e6255..e251a989b152 100644 > --- a/drivers/platform/chrome/wilco_ec/event.c > +++

Re: [PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-18 Thread Benson Leung
Hi Colin, On Tue, Jun 18, 2019 at 04:39:24PM +0100, Colin King wrote: > From: Colin Ian King > > If the kzalloc of the entries queue q fails a null pointer dereference > occurs when accessing q->capacity and q->lock. Add a kzalloc failure > check and handle the null return case in the calling

Re: [PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-18 Thread Benson Leung
Hi Nick, On Tue, Jun 18, 2019 at 11:15:03AM -0600, Nick Crews wrote: > Thanks Colin, good catch. > > Enric, could you squash this into the real commit? I've applied this to for-next and for-kernelci in chrome-platform. Thanks, Benson -- Benson Leung Staff Software Engineer Chrome OS Kernel

Re: [PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-18 Thread Nick Crews
Thanks Colin, good catch. Enric, could you squash this into the real commit? On Tue, Jun 18, 2019 at 9:39 AM Colin King wrote: > > From: Colin Ian King > > If the kzalloc of the entries queue q fails a null pointer dereference > occurs when accessing q->capacity and q->lock. Add a kzalloc

[PATCH][next] platform/chrome: wilco_ec: fix null pointer dereference on failed kzalloc

2019-06-18 Thread Colin King
From: Colin Ian King If the kzalloc of the entries queue q fails a null pointer dereference occurs when accessing q->capacity and q->lock. Add a kzalloc failure check and handle the null return case in the calling function event_device_add. Addresses-Coverity: ("Dereference null return")