lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Mar 2014 09:25:30 +0200
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	Sabrina Dubroca <sd@...asysnail.net>
Cc:	linux-gpio@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [bisected] NULL pointer dereference in acpi_gpiochip_add (on
 modprobe ssb)

On Mon, Mar 24, 2014 at 07:31:11PM +0100, Sabrina Dubroca wrote:
> > Actually gpiolib seems to handle ->dev as optional. Can you try this patch
> > instead? Thanks.
> > 
> > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> > index bf0f8b476696..642b2bf3360e 100644
> > --- a/drivers/gpio/gpiolib-acpi.c
> > +++ b/drivers/gpio/gpiolib-acpi.c
> > @@ -501,6 +501,9 @@ void acpi_gpiochip_add(struct gpio_chip *chip)
> >  	acpi_handle handle;
> >  	acpi_status status;
> >  
> > +	if (!chip || !chip->dev)
> > +		return;
> > +
> >  	handle = ACPI_HANDLE(chip->dev);
> >  	if (!handle)
> >  		return;
> > @@ -531,6 +534,9 @@ void acpi_gpiochip_remove(struct gpio_chip *chip)
> >  	acpi_handle handle;
> >  	acpi_status status;
> >  
> > +	if (!chip || !chip->dev)
> > +		return;
> > +
> >  	handle = ACPI_HANDLE(chip->dev);
> >  	if (!handle)
> >  		return;
> 
> Thanks, this patch solves the problem.

Great thanks for testing. Can I add your tested-by to the patch?

I'll submit a formal patch for this next week as I'm currently on vacation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ