<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpio, branch v4.6.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>gpio: make sure gpiod_to_irq() returns negative on NULL desc</title>
<updated>2016-06-24T17:22:06+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-06-15T20:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c6ad700afe337609d7d0ee37be0e469f08e86a1a'/>
<id>c6ad700afe337609d7d0ee37be0e469f08e86a1a</id>
<content type='text'>
commit 79bb71bd1d93197ce227fa167b450b633f30a52b upstream.

commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264
("gpio: bail out silently on NULL descriptors")
doesn't work for gpiod_to_irq(): drivers assume that NULL
descriptors will give negative IRQ numbers in return.

It has been pointed out that returning 0 is NO_IRQ and that
drivers should be amended to treat this as an error, but that
is for the longer term: now let us repair the semantics.

Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 79bb71bd1d93197ce227fa167b450b633f30a52b upstream.

commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264
("gpio: bail out silently on NULL descriptors")
doesn't work for gpiod_to_irq(): drivers assume that NULL
descriptors will give negative IRQ numbers in return.

It has been pointed out that returning 0 is NO_IRQ and that
drivers should be amended to treat this as an error, but that
is for the longer term: now let us repair the semantics.

Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: zynq: initialize clock even without CONFIG_PM</title>
<updated>2016-06-24T17:22:04+00:00</updated>
<author>
<name>Helmut Grohne</name>
<email>h.grohne@intenta.de</email>
</author>
<published>2016-06-03T12:15:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=faa9a645642292e354709e92dcf436b344961d92'/>
<id>faa9a645642292e354709e92dcf436b344961d92</id>
<content type='text'>
commit 0f84f29ff30bdb1bca23017b118b4ea3999cac32 upstream.

When the PM initialization was moved in the commit referenced below, the
code enabling the clock was removed from the probe function. On
CONFIG_PM=y kernels, this is not a problem as the pm resume hook enables
the clock, but when power management is disabled, all those pm_*
functions are noops and the clock is never enabled resulting in a
dysfunctional gpio controller.

Put the clock initialization back to support CONFIG_PM=n.

Signed-off-by: Helmut Grohne &lt;h.grohne@intenta.de&gt;
Fixes: 3773c195d387 ("gpio: zynq: Do PM initialization earlier to support gpio hogs")
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0f84f29ff30bdb1bca23017b118b4ea3999cac32 upstream.

When the PM initialization was moved in the commit referenced below, the
code enabling the clock was removed from the probe function. On
CONFIG_PM=y kernels, this is not a problem as the pm resume hook enables
the clock, but when power management is disabled, all those pm_*
functions are noops and the clock is never enabled resulting in a
dysfunctional gpio controller.

Put the clock initialization back to support CONFIG_PM=n.

Signed-off-by: Helmut Grohne &lt;h.grohne@intenta.de&gt;
Fixes: 3773c195d387 ("gpio: zynq: Do PM initialization earlier to support gpio hogs")
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: zynq: Fix the error path</title>
<updated>2016-06-24T17:22:04+00:00</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2016-04-04T18:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9216cad7f40c7f0727b1367482555ffa647edd9d'/>
<id>9216cad7f40c7f0727b1367482555ffa647edd9d</id>
<content type='text'>
commit 615d23f80efc60f8c5146223f305d19207c742e4 upstream.

pm_runtime_disable is called only in remove it is missed
out in the error path.
Fix the same.

Signed-off-by: Shubhrajyoti Datta &lt;shubhraj@xilinx.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Helmut Grohne &lt;h.grohne@intenta.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 615d23f80efc60f8c5146223f305d19207c742e4 upstream.

pm_runtime_disable is called only in remove it is missed
out in the error path.
Fix the same.

Signed-off-by: Shubhrajyoti Datta &lt;shubhraj@xilinx.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Helmut Grohne &lt;h.grohne@intenta.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: Fix unaligned used of reference counters</title>
<updated>2016-06-24T17:22:02+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2016-06-03T17:10:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=55d32af72aba4e0310fc38a39ef38b2ac73163a5'/>
<id>55d32af72aba4e0310fc38a39ef38b2ac73163a5</id>
<content type='text'>
commit f4833b8cc7edab57d3f3033e549111a546c2e02b upstream.

gpiolib relies on the reference counters to clean up the gpio_device
structure.

Although the number of get/put is properly aligned on gpiolib.c
itself, it does not take into consideration how the referece counters
are affected by other external functions such as cdev_add and device_add.

Because of this, after the last call to put_device, the reference counter
has a value of +3, therefore never calling gpiodevice_release.

Due to the fact that some of the device  has already been cleaned on
gpiochip_remove, the library will end up OOPsing the kernel (e.g. a call
to of_gpiochip_find_and_xlate).

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f4833b8cc7edab57d3f3033e549111a546c2e02b upstream.

gpiolib relies on the reference counters to clean up the gpio_device
structure.

Although the number of get/put is properly aligned on gpiolib.c
itself, it does not take into consideration how the referece counters
are affected by other external functions such as cdev_add and device_add.

Because of this, after the last call to put_device, the reference counter
has a value of +3, therefore never calling gpiodevice_release.

Due to the fact that some of the device  has already been cleaned on
gpiochip_remove, the library will end up OOPsing the kernel (e.g. a call
to of_gpiochip_find_and_xlate).

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: Fix NULL pointer deference</title>
<updated>2016-06-24T17:22:02+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2016-06-03T17:10:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d917611dc7234bc15662b07cde0ad4d5438277ce'/>
<id>d917611dc7234bc15662b07cde0ad4d5438277ce</id>
<content type='text'>
commit 11f33a6d15bfa397867ac0d7f3481b6dd683286f upstream.

Under some circumstances, a gpiochip might be half cleaned from the
gpio_device list.

This patch makes sure that the chip pointer is still valid, before
calling the match function.

[  104.088296] BUG: unable to handle kernel NULL pointer dereference at
0000000000000090
[  104.089772] IP: [&lt;ffffffff813d2045&gt;] of_gpiochip_find_and_xlate+0x15/0x80
[  104.128273] Call Trace:
[  104.129802]  [&lt;ffffffff813d2030&gt;] ? of_parse_own_gpio+0x1f0/0x1f0
[  104.131353]  [&lt;ffffffff813cd910&gt;] gpiochip_find+0x60/0x90
[  104.132868]  [&lt;ffffffff813d21ba&gt;] of_get_named_gpiod_flags+0x9a/0x120
...
[  104.141586]  [&lt;ffffffff8163d12b&gt;] gpio_led_probe+0x11b/0x360

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 11f33a6d15bfa397867ac0d7f3481b6dd683286f upstream.

Under some circumstances, a gpiochip might be half cleaned from the
gpio_device list.

This patch makes sure that the chip pointer is still valid, before
calling the match function.

[  104.088296] BUG: unable to handle kernel NULL pointer dereference at
0000000000000090
[  104.089772] IP: [&lt;ffffffff813d2045&gt;] of_gpiochip_find_and_xlate+0x15/0x80
[  104.128273] Call Trace:
[  104.129802]  [&lt;ffffffff813d2030&gt;] ? of_parse_own_gpio+0x1f0/0x1f0
[  104.131353]  [&lt;ffffffff813cd910&gt;] gpiochip_find+0x60/0x90
[  104.132868]  [&lt;ffffffff813d21ba&gt;] of_get_named_gpiod_flags+0x9a/0x120
...
[  104.141586]  [&lt;ffffffff8163d12b&gt;] gpio_led_probe+0x11b/0x360

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings</title>
<updated>2016-06-24T17:22:02+00:00</updated>
<author>
<name>Ben Dooks</name>
<email>ben.dooks@codethink.co.uk</email>
</author>
<published>2016-06-07T16:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ac63dc3fb6c8f20f50944c3c6214ffe1490a28c4'/>
<id>ac63dc3fb6c8f20f50944c3c6214ffe1490a28c4</id>
<content type='text'>
commit b66b2a0adf0e48973b582e055758b9907a7eee7c upstream.

The bcm_kona_gpio_reset() calls bcm_kona_gpio_write_lock_regs()
with what looks like the wrong parameter. The write_lock_regs
function takes a pointer to the registers, not the bcm_kona_gpio
structure.

Fix the warning, and probably bug by changing the function to
pass reg_base instead of kona_gpio, fixing the following warning:

drivers/gpio/gpio-bcm-kona.c:550:47: warning: incorrect type in argument 1
  (different address spaces)
  expected void [noderef] &lt;asn:2&gt;*reg_base
  got struct bcm_kona_gpio *kona_gpio
  warning: incorrect type in argument 1 (different address spaces)
  expected void [noderef] &lt;asn:2&gt;*reg_base
  got struct bcm_kona_gpio *kona_gpio

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Acked-by: Ray Jui &lt;ray.jui@broadcom.com&gt;
Reviewed-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b66b2a0adf0e48973b582e055758b9907a7eee7c upstream.

The bcm_kona_gpio_reset() calls bcm_kona_gpio_write_lock_regs()
with what looks like the wrong parameter. The write_lock_regs
function takes a pointer to the registers, not the bcm_kona_gpio
structure.

Fix the warning, and probably bug by changing the function to
pass reg_base instead of kona_gpio, fixing the following warning:

drivers/gpio/gpio-bcm-kona.c:550:47: warning: incorrect type in argument 1
  (different address spaces)
  expected void [noderef] &lt;asn:2&gt;*reg_base
  got struct bcm_kona_gpio *kona_gpio
  warning: incorrect type in argument 1 (different address spaces)
  expected void [noderef] &lt;asn:2&gt;*reg_base
  got struct bcm_kona_gpio *kona_gpio

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Acked-by: Ray Jui &lt;ray.jui@broadcom.com&gt;
Reviewed-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: bail out silently on NULL descriptors</title>
<updated>2016-06-24T17:22:02+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-05-30T14:48:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ecfb6ce5c09ce1fbfde39418123d4fc8ab4b7985'/>
<id>ecfb6ce5c09ce1fbfde39418123d4fc8ab4b7985</id>
<content type='text'>
commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264 upstream.

In fdeb8e1547cb9dd39d5d7223b33f3565cf86c28e
("gpio: reflect base and ngpio into gpio_device")
assumed that GPIO descriptors are either valid or error
pointers, but gpiod_get_[index_]optional() actually return
NULL descriptors and then all subsequent calls should just
bail out.

Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Fixes: fdeb8e1547cb ("gpio: reflect base and ngpio into gpio_device")
Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264 upstream.

In fdeb8e1547cb9dd39d5d7223b33f3565cf86c28e
("gpio: reflect base and ngpio into gpio_device")
assumed that GPIO descriptors are either valid or error
pointers, but gpiod_get_[index_]optional() actually return
NULL descriptors and then all subsequent calls should just
bail out.

Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Fixes: fdeb8e1547cb ("gpio: reflect base and ngpio into gpio_device")
Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list</title>
<updated>2016-04-30T11:51:59+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-04-25T13:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7df89e92a56a3d2c8f84aa76c61471e4a7bc24f9'/>
<id>7df89e92a56a3d2c8f84aa76c61471e4a7bc24f9</id>
<content type='text'>
Calling gpiod_get() from a module and then unloading the module leads to an
oops due to acpi_can_fallback_to_crs() storing the pointer to the passed
'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then
try to access the string but the memory may now be gone with the module.
Make a copy of the passed string instead, and store the copy on the list.

BUG: unable to handle kernel paging request at ffffffffa03e7855
IP: [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
PGD 2a07067 PUD 2a08063 PMD 74720067 PTE 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915(+) drm_kms_helper drm intel_gtt snd_hda_codec snd_hda_core i2c_algo_bit syscopya
rea sysfillrect sysimgblt fb_sys_fops agpgart snd_soc_sst_bytcr_rt5640 coretemp hwmon intel_rapl intel_soc_dts_thermal
punit_atom_debug snd_soc_rt5640 snd_soc_rl6231 serio snd_intel_sst_acpi snd_intel_sst_core video snd_soc_sst_mfld_platf
orm snd_soc_sst_match backlight int3402_thermal processor_thermal_device int3403_thermal int3400_thermal acpi_thermal_r
el snd_soc_core intel_soc_dts_iosf int340x_thermal_zone snd_compress i2c_hid hid snd_pcm snd_timer snd soundcore evdev
sch_fq_codel efivarfs ipv6 autofs4 [last unloaded: drm]
CPU: 2 PID: 3064 Comm: modprobe Tainted: G     U  W       4.6.0-rc3-ffrd-ipvr+ #302
Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8
_X64_R_2014_13_1_00 03/24/2014
task: ffff8800701cd200 ti: ffff880070034000 task.ti: ffff880070034000
RIP: 0010:[&lt;ffffffff81338322&gt;]  [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
RSP: 0000:ffff880070037748  EFLAGS: 00010286
RAX: 0000000080000000 RBX: ffff88007a342800 RCX: 0000000000000006
RDX: 0000000000000006 RSI: ffffffffa054f856 RDI: ffffffffa03e7856
RBP: ffff880070037748 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa054f855
R13: ffff88007281cae0 R14: 0000000000000010 R15: ffffffffffffffea
FS:  00007faa51447700(0000) GS:ffff880079300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa03e7855 CR3: 0000000041eba000 CR4: 00000000001006e0
Stack:
 ffff880070037770 ffffffff8136ad28 ffffffffa054f855 0000000000000000
 ffff88007a0a2098 ffff8800700377e8 ffffffff8136852e ffff88007a342800
 00000007700377a0 ffff8800700377a0 ffffffff81412442 70672d6c656e6170
Call Trace:
 [&lt;ffffffff8136ad28&gt;] acpi_can_fallback_to_crs+0x88/0x100
 [&lt;ffffffff8136852e&gt;] gpiod_get_index+0x25e/0x310
 [&lt;ffffffff81412442&gt;] ? mipi_dsi_attach+0x22/0x30
 [&lt;ffffffff813685f2&gt;] gpiod_get+0x12/0x20
 [&lt;ffffffffa04fcf41&gt;] intel_dsi_init+0x421/0x480 [i915]
 [&lt;ffffffffa04d3783&gt;] intel_modeset_init+0x853/0x16b0 [i915]
 [&lt;ffffffffa0504864&gt;] ? intel_setup_gmbus+0x214/0x260 [i915]
 [&lt;ffffffffa0510158&gt;] i915_driver_load+0xdc8/0x19b0 [i915]
 [&lt;ffffffff8160fb53&gt;] ? _raw_spin_unlock_irqrestore+0x43/0x70
 [&lt;ffffffffa026b13b&gt;] drm_dev_register+0xab/0xc0 [drm]
 [&lt;ffffffffa026d7b3&gt;] drm_get_pci_dev+0x93/0x1f0 [drm]
 [&lt;ffffffff8160fb53&gt;] ? _raw_spin_unlock_irqrestore+0x43/0x70
 [&lt;ffffffffa043f1f4&gt;] i915_pci_probe+0x34/0x50 [i915]
 [&lt;ffffffff81379751&gt;] pci_device_probe+0x91/0x100
 [&lt;ffffffff8141a75a&gt;] driver_probe_device+0x20a/0x2d0
 [&lt;ffffffff8141a8be&gt;] __driver_attach+0x9e/0xb0
 [&lt;ffffffff8141a820&gt;] ? driver_probe_device+0x2d0/0x2d0
 [&lt;ffffffff81418439&gt;] bus_for_each_dev+0x69/0xa0
 [&lt;ffffffff8141a04e&gt;] driver_attach+0x1e/0x20
 [&lt;ffffffff81419c20&gt;] bus_add_driver+0x1c0/0x240
 [&lt;ffffffff8141b6d0&gt;] driver_register+0x60/0xe0
 [&lt;ffffffff81377d20&gt;] __pci_register_driver+0x60/0x70
 [&lt;ffffffffa026d9f4&gt;] drm_pci_init+0xe4/0x110 [drm]
 [&lt;ffffffff810ce04e&gt;] ? trace_hardirqs_on+0xe/0x10
 [&lt;ffffffffa02f1000&gt;] ? 0xffffffffa02f1000
 [&lt;ffffffffa02f1094&gt;] i915_init+0x94/0x9b [i915]
 [&lt;ffffffff810003bb&gt;] do_one_initcall+0x8b/0x1c0
 [&lt;ffffffff810eb616&gt;] ? rcu_read_lock_sched_held+0x86/0x90
 [&lt;ffffffff811de6d6&gt;] ? kmem_cache_alloc_trace+0x1f6/0x270
 [&lt;ffffffff81183826&gt;] do_init_module+0x60/0x1dc
 [&lt;ffffffff81115a8d&gt;] load_module+0x1d0d/0x2390
 [&lt;ffffffff811120b0&gt;] ? __symbol_put+0x70/0x70
 [&lt;ffffffff811f41b2&gt;] ? kernel_read_file+0x92/0x120
 [&lt;ffffffff811162f4&gt;] SYSC_finit_module+0xa4/0xb0
 [&lt;ffffffff8111631e&gt;] SyS_finit_module+0xe/0x10
 [&lt;ffffffff81001ff3&gt;] do_syscall_64+0x63/0x350
 [&lt;ffffffff816103da&gt;] entry_SYSCALL64_slow_path+0x25/0x25
Code: f7 48 8d 76 01 48 8d 52 01 0f b6 4e ff 84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0
 74 18 48 8d 7f 01 48 8d 76 01 &lt;0f&gt; b6 47 ff 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31 c0 5d c3 66
RIP  [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
 RSP &lt;ffff880070037748&gt;
CR2: ffffffffa03e7855

v2: Make the copied con_id const

Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: stable@vger.kernel.org
Fixes: 10cf4899f8af ("gpiolib: tighten up ACPI legacy gpio lookups")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling gpiod_get() from a module and then unloading the module leads to an
oops due to acpi_can_fallback_to_crs() storing the pointer to the passed
'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then
try to access the string but the memory may now be gone with the module.
Make a copy of the passed string instead, and store the copy on the list.

BUG: unable to handle kernel paging request at ffffffffa03e7855
IP: [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
PGD 2a07067 PUD 2a08063 PMD 74720067 PTE 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915(+) drm_kms_helper drm intel_gtt snd_hda_codec snd_hda_core i2c_algo_bit syscopya
rea sysfillrect sysimgblt fb_sys_fops agpgart snd_soc_sst_bytcr_rt5640 coretemp hwmon intel_rapl intel_soc_dts_thermal
punit_atom_debug snd_soc_rt5640 snd_soc_rl6231 serio snd_intel_sst_acpi snd_intel_sst_core video snd_soc_sst_mfld_platf
orm snd_soc_sst_match backlight int3402_thermal processor_thermal_device int3403_thermal int3400_thermal acpi_thermal_r
el snd_soc_core intel_soc_dts_iosf int340x_thermal_zone snd_compress i2c_hid hid snd_pcm snd_timer snd soundcore evdev
sch_fq_codel efivarfs ipv6 autofs4 [last unloaded: drm]
CPU: 2 PID: 3064 Comm: modprobe Tainted: G     U  W       4.6.0-rc3-ffrd-ipvr+ #302
Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8
_X64_R_2014_13_1_00 03/24/2014
task: ffff8800701cd200 ti: ffff880070034000 task.ti: ffff880070034000
RIP: 0010:[&lt;ffffffff81338322&gt;]  [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
RSP: 0000:ffff880070037748  EFLAGS: 00010286
RAX: 0000000080000000 RBX: ffff88007a342800 RCX: 0000000000000006
RDX: 0000000000000006 RSI: ffffffffa054f856 RDI: ffffffffa03e7856
RBP: ffff880070037748 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa054f855
R13: ffff88007281cae0 R14: 0000000000000010 R15: ffffffffffffffea
FS:  00007faa51447700(0000) GS:ffff880079300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa03e7855 CR3: 0000000041eba000 CR4: 00000000001006e0
Stack:
 ffff880070037770 ffffffff8136ad28 ffffffffa054f855 0000000000000000
 ffff88007a0a2098 ffff8800700377e8 ffffffff8136852e ffff88007a342800
 00000007700377a0 ffff8800700377a0 ffffffff81412442 70672d6c656e6170
Call Trace:
 [&lt;ffffffff8136ad28&gt;] acpi_can_fallback_to_crs+0x88/0x100
 [&lt;ffffffff8136852e&gt;] gpiod_get_index+0x25e/0x310
 [&lt;ffffffff81412442&gt;] ? mipi_dsi_attach+0x22/0x30
 [&lt;ffffffff813685f2&gt;] gpiod_get+0x12/0x20
 [&lt;ffffffffa04fcf41&gt;] intel_dsi_init+0x421/0x480 [i915]
 [&lt;ffffffffa04d3783&gt;] intel_modeset_init+0x853/0x16b0 [i915]
 [&lt;ffffffffa0504864&gt;] ? intel_setup_gmbus+0x214/0x260 [i915]
 [&lt;ffffffffa0510158&gt;] i915_driver_load+0xdc8/0x19b0 [i915]
 [&lt;ffffffff8160fb53&gt;] ? _raw_spin_unlock_irqrestore+0x43/0x70
 [&lt;ffffffffa026b13b&gt;] drm_dev_register+0xab/0xc0 [drm]
 [&lt;ffffffffa026d7b3&gt;] drm_get_pci_dev+0x93/0x1f0 [drm]
 [&lt;ffffffff8160fb53&gt;] ? _raw_spin_unlock_irqrestore+0x43/0x70
 [&lt;ffffffffa043f1f4&gt;] i915_pci_probe+0x34/0x50 [i915]
 [&lt;ffffffff81379751&gt;] pci_device_probe+0x91/0x100
 [&lt;ffffffff8141a75a&gt;] driver_probe_device+0x20a/0x2d0
 [&lt;ffffffff8141a8be&gt;] __driver_attach+0x9e/0xb0
 [&lt;ffffffff8141a820&gt;] ? driver_probe_device+0x2d0/0x2d0
 [&lt;ffffffff81418439&gt;] bus_for_each_dev+0x69/0xa0
 [&lt;ffffffff8141a04e&gt;] driver_attach+0x1e/0x20
 [&lt;ffffffff81419c20&gt;] bus_add_driver+0x1c0/0x240
 [&lt;ffffffff8141b6d0&gt;] driver_register+0x60/0xe0
 [&lt;ffffffff81377d20&gt;] __pci_register_driver+0x60/0x70
 [&lt;ffffffffa026d9f4&gt;] drm_pci_init+0xe4/0x110 [drm]
 [&lt;ffffffff810ce04e&gt;] ? trace_hardirqs_on+0xe/0x10
 [&lt;ffffffffa02f1000&gt;] ? 0xffffffffa02f1000
 [&lt;ffffffffa02f1094&gt;] i915_init+0x94/0x9b [i915]
 [&lt;ffffffff810003bb&gt;] do_one_initcall+0x8b/0x1c0
 [&lt;ffffffff810eb616&gt;] ? rcu_read_lock_sched_held+0x86/0x90
 [&lt;ffffffff811de6d6&gt;] ? kmem_cache_alloc_trace+0x1f6/0x270
 [&lt;ffffffff81183826&gt;] do_init_module+0x60/0x1dc
 [&lt;ffffffff81115a8d&gt;] load_module+0x1d0d/0x2390
 [&lt;ffffffff811120b0&gt;] ? __symbol_put+0x70/0x70
 [&lt;ffffffff811f41b2&gt;] ? kernel_read_file+0x92/0x120
 [&lt;ffffffff811162f4&gt;] SYSC_finit_module+0xa4/0xb0
 [&lt;ffffffff8111631e&gt;] SyS_finit_module+0xe/0x10
 [&lt;ffffffff81001ff3&gt;] do_syscall_64+0x63/0x350
 [&lt;ffffffff816103da&gt;] entry_SYSCALL64_slow_path+0x25/0x25
Code: f7 48 8d 76 01 48 8d 52 01 0f b6 4e ff 84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0
 74 18 48 8d 7f 01 48 8d 76 01 &lt;0f&gt; b6 47 ff 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31 c0 5d c3 66
RIP  [&lt;ffffffff81338322&gt;] strcmp+0x12/0x30
 RSP &lt;ffff880070037748&gt;
CR2: ffffffffa03e7855

v2: Make the copied con_id const

Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: stable@vger.kernel.org
Fixes: 10cf4899f8af ("gpiolib: tighten up ACPI legacy gpio lookups")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "gpio: rcar: Fine-grained Runtime PM support"</title>
<updated>2016-04-12T08:05:22+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-04-12T08:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7'/>
<id>ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7</id>
<content type='text'>
This reverts commit 65194cb174b873448b208eb6e04ecb72237af76e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 65194cb174b873448b208eb6e04ecb72237af76e.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "gpio: rcar: Add Runtime PM handling for interrupts"</title>
<updated>2016-04-12T08:00:34+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-04-12T08:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=42c25013ca95ce79b4ed192188ca843ae48f8c71'/>
<id>42c25013ca95ce79b4ed192188ca843ae48f8c71</id>
<content type='text'>
This reverts commit b26a719bdba9aa926ceaadecc66e07623d2b8a53.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit b26a719bdba9aa926ceaadecc66e07623d2b8a53.
</pre>
</div>
</content>
</entry>
</feed>
