Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396634
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201 |
| Date | 2016-05-09 09:10 +0200 |
| Message-ID | <rwNui-87C-7@gated-at.bofh.it> (permalink) |
| References | <rvVNg-4os-11@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201 Colin Pitrat <colin.pitrat@gmail.com> - 2016-05-06 23:50 +0200
Re: [PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201 Colin Pitrat <colin.pitrat@gmail.com> - 2016-05-07 21:40 +0200
Re: [PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201 Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-05-09 09:10 +0200
Re: [PATCH] gpio: sch: Fix Oops on module load on Asus Eee PC 1201 Colin Pitrat <colin.pitrat@gmail.com> - 2016-05-09 21:40 +0200
csiph-web