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]
Message-ID: <20160509070245.GJ15974@lahna.fi.intel.com>
Date:	Mon, 9 May 2016 10:02:45 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	Colin Pitrat <colin.pitrat@...il.com>
Cc:	linus.walleij@...aro.org, gnurou@...il.com,
	rebecca.swee.fun.chang@...el.com, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201

On Fri, May 06, 2016 at 10:49:25PM +0100, Colin Pitrat wrote:
> This fixes the issue descirbe in bug 117531. 

Can you include the oops log in the changelog as well?

> It's a regression introduced in linux 4.5 that causes a Oops at load of
> gpio_sch and prevents powering off the computer.
> 
> The patch consist in reverting commit 737c8fccf1c5b2aae3c6d9a66dce17e35fc39b71 
> (a.k.a 'gpio: sch: use gpiochip data pointer') that causes this regression.
> However, although it does work for me, I'm not sure of the impact of reverting
> only this part of the patch.

What happens here is that after the change we expect that
gpiochip_get_data() returns the correct pointer but that only happens
after devm_gpiochip_add_data() is called, which is the last call in
sch_gpio_probe(). Before that we call sch_gpio_reg_set() couple of times
if the device id is PCI_DEVICE_ID_INTEL_SCH_LPC and that causes NULL
pointer dereference.

I think better fix is to make sch_gpio_reg_get() and sch_gpio_reg_set()
take pointer to struct sch_gpio and use that directly like:

static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio,
			     unsigned reg, int val)
{
	...
}

Neither function actually need gc for anything anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ