Re: [PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-28 Thread Andy Shevchenko
On Mon, Jan 28, 2019 at 4:39 PM Mattias Jacobsson <2...@mok.nu> wrote: > On 2019-01-27, Andy Shevchenko wrote: > > On Tue, Jan 22, 2019 at 10:04 PM Mattias Jacobsson <2...@mok.nu> wrote: > > > - struct wmi_driver *wmi_driver = > > > - container_of(driver, struct wmi_driver, dri

Re: [PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-28 Thread Mattias Jacobsson
Hi, On 2019-01-27, Andy Shevchenko wrote: > On Tue, Jan 22, 2019 at 10:04 PM Mattias Jacobsson <2...@mok.nu> wrote: > > > > In the function wmi_dev_match() there are three variables that > > potentially can result in a null pointer dereference. Namely: > > dev/wblock, driver/wmi_driver, and wmi_dr

Re: [PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-27 Thread Andy Shevchenko
On Tue, Jan 22, 2019 at 10:04 PM Mattias Jacobsson <2...@mok.nu> wrote: > > In the function wmi_dev_match() there are three variables that > potentially can result in a null pointer dereference. Namely: > dev/wblock, driver/wmi_driver, and wmi_driver->id_table. > > Check for NULL and return that th

Re: [PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-27 Thread Mattias Jacobsson
Hi Darren, On 2019-01-26, Darren Hart wrote: > On Tue, Jan 22, 2019 at 09:03:01PM +0100, Mattias Jacobsson wrote: > > In the function wmi_dev_match() there are three variables that > > potentially can result in a null pointer dereference. Namely: > > Is this something you have observed? This gets

Re: [PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-26 Thread Darren Hart
On Tue, Jan 22, 2019 at 09:03:01PM +0100, Mattias Jacobsson wrote: > In the function wmi_dev_match() there are three variables that > potentially can result in a null pointer dereference. Namely: Is this something you have observed? This gets called when a new driver registered for each unassociat

[PATCH] platform/x86: wmi: fix potential null pointer dereferences

2019-01-22 Thread Mattias Jacobsson
In the function wmi_dev_match() there are three variables that potentially can result in a null pointer dereference. Namely: dev/wblock, driver/wmi_driver, and wmi_driver->id_table. Check for NULL and return that the driver can't handle the device if any of these variables would result in a null p