<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/power, branch v3.16.78</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>power: supply: olpc_battery: correct the temperature units</title>
<updated>2019-04-04T15:13:42+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-11-16T16:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e4046d5d6c52101ec1cbb962102d8f4c99edd255'/>
<id>e4046d5d6c52101ec1cbb962102d8f4c99edd255</id>
<content type='text'>
commit ed54ffbe554f0902689fd6d1712bbacbacd11376 upstream.

According to [1] and [2], the temperature values are in tenths of degree
Celsius. Exposing the Celsius value makes the battery appear on fire:

  $ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery
  ...
      temperature:         236.9 degrees C

Tested on OLPC XO-1 and OLPC XO-1.75 laptops.

[1] include/linux/power_supply.h
[2] Documentation/power/power_supply_class.txt

Fixes: fb972873a767 ("[BATTERY] One Laptop Per Child power/battery driver")
Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ed54ffbe554f0902689fd6d1712bbacbacd11376 upstream.

According to [1] and [2], the temperature values are in tenths of degree
Celsius. Exposing the Celsius value makes the battery appear on fire:

  $ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery
  ...
      temperature:         236.9 degrees C

Tested on OLPC XO-1 and OLPC XO-1.75 laptops.

[1] include/linux/power_supply.h
[2] Documentation/power/power_supply_class.txt

Fixes: fb972873a767 ("[BATTERY] One Laptop Per Child power/battery driver")
Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: max8998-charger: Fix platform data retrieval</title>
<updated>2019-02-11T17:53:19+00:00</updated>
<author>
<name>Tomasz Figa</name>
<email>tomasz.figa@gmail.com</email>
</author>
<published>2018-07-17T16:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1888705c8591c012e9064c8fac2df3c76a6a5e33'/>
<id>1888705c8591c012e9064c8fac2df3c76a6a5e33</id>
<content type='text'>
commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 upstream.

Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.

Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
Signed-off-by: Tomasz Figa &lt;tomasz.figa@gmail.com&gt;
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 upstream.

Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.

Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
Signed-off-by: Tomasz Figa &lt;tomasz.figa@gmail.com&gt;
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: generic-adc-battery: check for duplicate properties copied from iio channels</title>
<updated>2018-12-16T22:08:11+00:00</updated>
<author>
<name>H. Nikolaus Schaller</name>
<email>hns@goldelico.com</email>
</author>
<published>2018-06-26T13:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=51e9753f79f894885100ad6d6991a67d07f975a2'/>
<id>51e9753f79f894885100ad6d6991a67d07f975a2</id>
<content type='text'>
commit a427503edaaed9b75ed9746a654cece7e93e60a8 upstream.

If an iio channel defines a basic property, there are duplicate entries
in /sys/class/power/*/uevent.

So add a check to avoid duplicates. Since all channels may be duplicates,
we have to modify the related error check.

Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16:
 - s/psy_desc/psy/
 - Adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a427503edaaed9b75ed9746a654cece7e93e60a8 upstream.

If an iio channel defines a basic property, there are duplicate entries
in /sys/class/power/*/uevent.

So add a check to avoid duplicates. Since all channels may be duplicates,
we have to modify the related error check.

Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16:
 - s/psy_desc/psy/
 - Adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: generic-adc-battery: fix out-of-bounds write when copying channel properties</title>
<updated>2018-12-16T22:08:10+00:00</updated>
<author>
<name>H. Nikolaus Schaller</name>
<email>hns@goldelico.com</email>
</author>
<published>2018-06-26T13:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=640fbee0b753fb2ce9f30115230430f03678a13c'/>
<id>640fbee0b753fb2ce9f30115230430f03678a13c</id>
<content type='text'>
commit 932d47448c3caa0fa99e84d7f5bc302aa286efd8 upstream.

We did have sporadic problems in the pinctrl framework during boot
where a pin group name unexpectedly became NULL leading to a NULL
dereference in strcmp.

Detailled analysis of the failing cases did reveal that there were
two devm allocated objects close to each other. The second one was
the affected group_desc in pinmux and the first one was the
psy_desc-&gt;properties buffer of the gab driver.

Review of the gab code showed that the address calculation for
one memcpy() is wrong. It does

	properties + sizeof(type) * index

but C is defined to do the index multiplication already for
pointer + integer additions. Hence the factor was applied twice
and the memcpy() does write outside of the properties buffer.
Sometimes it happened to be the pinctrl and triggered the strcmp(NULL).

Anyways, it is overkill to use a memcpy() here instead of a simple
assignment, which is easier to read and has less risk for wrong
address calculations. So we change code to a simple assignment.

If we initialize the index to the first free location, we can even
remove the local variable 'properties'.

This bug seems to exist right from the beginning in 3.7-rc1 in

commit e60fea794e6e ("power: battery: Generic battery driver using IIO")

Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16:
 - s/psy_desc/psy/g
 - Adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 932d47448c3caa0fa99e84d7f5bc302aa286efd8 upstream.

We did have sporadic problems in the pinctrl framework during boot
where a pin group name unexpectedly became NULL leading to a NULL
dereference in strcmp.

Detailled analysis of the failing cases did reveal that there were
two devm allocated objects close to each other. The second one was
the affected group_desc in pinmux and the first one was the
psy_desc-&gt;properties buffer of the gab driver.

Review of the gab code showed that the address calculation for
one memcpy() is wrong. It does

	properties + sizeof(type) * index

but C is defined to do the index multiplication already for
pointer + integer additions. Hence the factor was applied twice
and the memcpy() does write outside of the properties buffer.
Sometimes it happened to be the pinctrl and triggered the strcmp(NULL).

Anyways, it is overkill to use a memcpy() here instead of a simple
assignment, which is easier to read and has less risk for wrong
address calculations. So we change code to a simple assignment.

If we initialize the index to the first free location, we can even
remove the local variable 'properties'.

This bug seems to exist right from the beginning in 3.7-rc1 in

commit e60fea794e6e ("power: battery: Generic battery driver using IIO")

Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16:
 - s/psy_desc/psy/g
 - Adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'</title>
<updated>2018-06-16T21:21:41+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-11-22T20:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=aafa57f9e7ff0e0b20404f648526fa6db632a57c'/>
<id>aafa57f9e7ff0e0b20404f648526fa6db632a57c</id>
<content type='text'>
commit 09edcb647542487864e23aa8d2ef26be3e08978a upstream.

If an error occurs when we enable the backup battery charging, we should
go through the error handling path directly.

Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this
was the case, but this commit has added some code between the last test and
the 'out' label.
So, in case of error, this added code is executed and the error may be
silently ignored.

Fix it by adding the missing 'goto out', as done in all other error
handling paths.

Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 09edcb647542487864e23aa8d2ef26be3e08978a upstream.

If an error occurs when we enable the backup battery charging, we should
go through the error handling path directly.

Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this
was the case, but this commit has added some code between the last test and
the 'out' label.
So, in case of error, this added code is executed and the error may be
silently ignored.

Fix it by adding the missing 'goto out', as done in all other error
handling paths.

Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: ab8500_charger: Fix an error handling path</title>
<updated>2018-06-16T21:21:41+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-11-22T20:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6fed33c3a424c746bbbb7cf983bfa1df17adb60f'/>
<id>6fed33c3a424c746bbbb7cf983bfa1df17adb60f</id>
<content type='text'>
commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb upstream.

'ret' is know to be 0 at this point, because it has not been updated by the
the previous call to 'abx500_mask_and_set_register_interruptible()'.

Fix it by updating 'ret' before checking if an error occurred.

Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb upstream.

'ret' is know to be 0 at this point, because it has not been updated by the
the previous call to 'abx500_mask_and_set_register_interruptible()'.

Fix it by updating 'ret' before checking if an error occurred.

Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power/reset: xgene-reset: Fix prototype of xgene_restart()</title>
<updated>2017-11-11T13:33:44+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@linaro.org</email>
</author>
<published>2014-08-25T00:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a04a7aa1428d03f11128c1ba83c9fa3a0758ef9c'/>
<id>a04a7aa1428d03f11128c1ba83c9fa3a0758ef9c</id>
<content type='text'>
commit d3ed534cca703b2aaeee9277a5b8063ae6eab1d1 upstream.

The xgene-reset driver uses xgene_restart() as arm_pm_restart() but that
function should take an enum reset_type as the first argument rather than
a char. Fix this; the paramter is not referenced in the implementation.

Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d3ed534cca703b2aaeee9277a5b8063ae6eab1d1 upstream.

The xgene-reset driver uses xgene_restart() as arm_pm_restart() but that
function should take an enum reset_type as the first argument rather than
a char. Fix this; the paramter is not referenced in the implementation.

Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: pda_power: move from timer to delayed_work</title>
<updated>2017-08-26T01:14:42+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>michael@amarulasolutions.com</email>
</author>
<published>2017-04-25T13:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a450fa9fa7de3787462361acf0ca2383eeb2789'/>
<id>8a450fa9fa7de3787462361acf0ca2383eeb2789</id>
<content type='text'>
commit 633e8799ddc09431be2744c4a1efdbda13af2b0b upstream.

This changed is needed to avoid locking problem during
boot as shown:

&lt;5&gt;[    8.824096] Registering SWP/SWPB emulation handler
&lt;6&gt;[    8.977294] clock: disabling unused clocks to save power
&lt;3&gt;[    9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269
&lt;3&gt;[    9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
&lt;4&gt;[    9.130249] 3 locks held by swapper/0/1:
&lt;4&gt;[    9.134613]  #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342430&gt;] __driver_attach+0x58/0xa8
&lt;4&gt;[    9.144500]  #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342440&gt;] __driver_attach+0x68/0xa8
&lt;4&gt;[    9.154357]  #2:  (&amp;polling_timer){......}, at: [&lt;c0053770&gt;] run_timer_softirq+0x108/0x3ec
&lt;4&gt;[    9.163726] Backtrace:
&lt;4&gt;[    9.166473] [&lt;c001269c&gt;] (dump_backtrace+0x0/0x114) from [&lt;c067e5f0&gt;] (dump_stack+0x20/0x24)
&lt;4&gt;[    9.175811]  r6:00203230 r5:0000010d r4:d782e000 r3:60000113
&lt;4&gt;[    9.182250] [&lt;c067e5d0&gt;] (dump_stack+0x0/0x24) from [&lt;c007441c&gt;] (__might_sleep+0x10c/0x128)
&lt;4&gt;[    9.191650] [&lt;c0074310&gt;] (__might_sleep+0x0/0x128) from [&lt;c0688f60&gt;] (mutex_lock_nested+0x34/0x36c)
&lt;4&gt;[    9.201660]  r5:c02d5350 r4:d79a0c64
&lt;4&gt;[    9.205688] [&lt;c0688f2c&gt;] (mutex_lock_nested+0x0/0x36c) from [&lt;c02d5350&gt;] (regulator_set_current_limit+0x30/0x118)
&lt;4&gt;[    9.217071] [&lt;c02d5320&gt;] (regulator_set_current_limit+0x0/0x118) from [&lt;c0435ce0&gt;] (update_charger+0x84/0xc4)
&lt;4&gt;[    9.228027]  r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000
&lt;4&gt;[    9.234436] [&lt;c0435c5c&gt;] (update_charger+0x0/0xc4) from [&lt;c0435d40&gt;] (psy_changed+0x20/0x48)
&lt;4&gt;[    9.243804]  r5:d782e000 r4:c1767e94
&lt;4&gt;[    9.247802] [&lt;c0435d20&gt;] (psy_changed+0x0/0x48) from [&lt;c0435dec&gt;] (polling_timer_func+0x84/0xb8)
&lt;4&gt;[    9.257537]  r4:c1767e94 r3:00000002
&lt;4&gt;[    9.261566] [&lt;c0435d68&gt;] (polling_timer_func+0x0/0xb8) from [&lt;c00537e4&gt;] (run_timer_softirq+0x17c/0x3ec)
&lt;4&gt;[    9.272033]  r4:c1767eb0 r3:00000000
&lt;4&gt;[    9.276062] [&lt;c0053668&gt;] (run_timer_softirq+0x0/0x3ec) from [&lt;c004b000&gt;] (__do_softirq+0xf0/0x298)
&lt;4&gt;[    9.286010] [&lt;c004af10&gt;] (__do_softirq+0x0/0x298) from [&lt;c004b650&gt;] (irq_exit+0x98/0xa0)
&lt;4&gt;[    9.295013] [&lt;c004b5b8&gt;] (irq_exit+0x0/0xa0) from [&lt;c000edbc&gt;] (handle_IRQ+0x60/0xc0)
&lt;4&gt;[    9.303680]  r4:c1194e98 r3:c00bc778
&lt;4&gt;[    9.307708] [&lt;c000ed5c&gt;] (handle_IRQ+0x0/0xc0) from [&lt;c0008504&gt;] (gic_handle_irq+0x34/0x68)
&lt;4&gt;[    9.316955]  r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100
&lt;4&gt;[    9.324310] r3:c026ba48
&lt;4&gt;[    9.327301] [&lt;c00084d0&gt;] (gic_handle_irq+0x0/0x68) from [&lt;c068c2c0&gt;] (__irq_svc+0x40/0x74)
&lt;4&gt;[    9.336456] Exception stack(0xd782fc08 to 0xd782fc50)
&lt;4&gt;[    9.342041] fc00:                   d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000
&lt;4&gt;[    9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50
&lt;4&gt;[    9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff

Fixes: b2998049cfae ("[BATTERY] pda_power platform driver")
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 633e8799ddc09431be2744c4a1efdbda13af2b0b upstream.

This changed is needed to avoid locking problem during
boot as shown:

&lt;5&gt;[    8.824096] Registering SWP/SWPB emulation handler
&lt;6&gt;[    8.977294] clock: disabling unused clocks to save power
&lt;3&gt;[    9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269
&lt;3&gt;[    9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
&lt;4&gt;[    9.130249] 3 locks held by swapper/0/1:
&lt;4&gt;[    9.134613]  #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342430&gt;] __driver_attach+0x58/0xa8
&lt;4&gt;[    9.144500]  #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342440&gt;] __driver_attach+0x68/0xa8
&lt;4&gt;[    9.154357]  #2:  (&amp;polling_timer){......}, at: [&lt;c0053770&gt;] run_timer_softirq+0x108/0x3ec
&lt;4&gt;[    9.163726] Backtrace:
&lt;4&gt;[    9.166473] [&lt;c001269c&gt;] (dump_backtrace+0x0/0x114) from [&lt;c067e5f0&gt;] (dump_stack+0x20/0x24)
&lt;4&gt;[    9.175811]  r6:00203230 r5:0000010d r4:d782e000 r3:60000113
&lt;4&gt;[    9.182250] [&lt;c067e5d0&gt;] (dump_stack+0x0/0x24) from [&lt;c007441c&gt;] (__might_sleep+0x10c/0x128)
&lt;4&gt;[    9.191650] [&lt;c0074310&gt;] (__might_sleep+0x0/0x128) from [&lt;c0688f60&gt;] (mutex_lock_nested+0x34/0x36c)
&lt;4&gt;[    9.201660]  r5:c02d5350 r4:d79a0c64
&lt;4&gt;[    9.205688] [&lt;c0688f2c&gt;] (mutex_lock_nested+0x0/0x36c) from [&lt;c02d5350&gt;] (regulator_set_current_limit+0x30/0x118)
&lt;4&gt;[    9.217071] [&lt;c02d5320&gt;] (regulator_set_current_limit+0x0/0x118) from [&lt;c0435ce0&gt;] (update_charger+0x84/0xc4)
&lt;4&gt;[    9.228027]  r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000
&lt;4&gt;[    9.234436] [&lt;c0435c5c&gt;] (update_charger+0x0/0xc4) from [&lt;c0435d40&gt;] (psy_changed+0x20/0x48)
&lt;4&gt;[    9.243804]  r5:d782e000 r4:c1767e94
&lt;4&gt;[    9.247802] [&lt;c0435d20&gt;] (psy_changed+0x0/0x48) from [&lt;c0435dec&gt;] (polling_timer_func+0x84/0xb8)
&lt;4&gt;[    9.257537]  r4:c1767e94 r3:00000002
&lt;4&gt;[    9.261566] [&lt;c0435d68&gt;] (polling_timer_func+0x0/0xb8) from [&lt;c00537e4&gt;] (run_timer_softirq+0x17c/0x3ec)
&lt;4&gt;[    9.272033]  r4:c1767eb0 r3:00000000
&lt;4&gt;[    9.276062] [&lt;c0053668&gt;] (run_timer_softirq+0x0/0x3ec) from [&lt;c004b000&gt;] (__do_softirq+0xf0/0x298)
&lt;4&gt;[    9.286010] [&lt;c004af10&gt;] (__do_softirq+0x0/0x298) from [&lt;c004b650&gt;] (irq_exit+0x98/0xa0)
&lt;4&gt;[    9.295013] [&lt;c004b5b8&gt;] (irq_exit+0x0/0xa0) from [&lt;c000edbc&gt;] (handle_IRQ+0x60/0xc0)
&lt;4&gt;[    9.303680]  r4:c1194e98 r3:c00bc778
&lt;4&gt;[    9.307708] [&lt;c000ed5c&gt;] (handle_IRQ+0x0/0xc0) from [&lt;c0008504&gt;] (gic_handle_irq+0x34/0x68)
&lt;4&gt;[    9.316955]  r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100
&lt;4&gt;[    9.324310] r3:c026ba48
&lt;4&gt;[    9.327301] [&lt;c00084d0&gt;] (gic_handle_irq+0x0/0x68) from [&lt;c068c2c0&gt;] (__irq_svc+0x40/0x74)
&lt;4&gt;[    9.336456] Exception stack(0xd782fc08 to 0xd782fc50)
&lt;4&gt;[    9.342041] fc00:                   d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000
&lt;4&gt;[    9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50
&lt;4&gt;[    9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff

Fixes: b2998049cfae ("[BATTERY] pda_power platform driver")
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: isp1704: Fix unchecked return value of devm_kzalloc</title>
<updated>2017-08-26T01:14:42+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2017-04-24T08:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=df5a28b8505f81526167b6311fdb2d9fc8994233'/>
<id>df5a28b8505f81526167b6311fdb2d9fc8994233</id>
<content type='text'>
commit 8b20839988f1ed5e534b270f3776709b640dc7e0 upstream.

Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.

Fixes: 34a109610e2a ("isp1704_charger: Add DT support")
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8b20839988f1ed5e534b270f3776709b640dc7e0 upstream.

Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.

Fixes: 34a109610e2a ("isp1704_charger: Add DT support")
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: lp8788: prevent out of bounds array access</title>
<updated>2017-08-26T01:14:31+00:00</updated>
<author>
<name>Giedrius Statkevičius</name>
<email>giedrius.statkevicius@gmail.com</email>
</author>
<published>2017-03-25T16:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1d4198c528dafc809f6bca277018359aa43b2953'/>
<id>1d4198c528dafc809f6bca277018359aa43b2953</id>
<content type='text'>
commit bdd9968d35f7fcdb76089347d1529bf079534214 upstream.

val might become 7 in which case stime[7] (array of length 7) would be
accessed during the scnprintf call later and that will cause issues.
Obviously, string concatenation is not intended here so just a comma needs
to be added to fix the issue.

Fixes: 98a276649358 ("power_supply: Add new lp8788 charger driver")
Signed-off-by: Giedrius Statkevičius &lt;giedrius.statkevicius@gmail.com&gt;
Acked-by: Milo Kim &lt;milo.kim@ti.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bdd9968d35f7fcdb76089347d1529bf079534214 upstream.

val might become 7 in which case stime[7] (array of length 7) would be
accessed during the scnprintf call later and that will cause issues.
Obviously, string concatenation is not intended here so just a comma needs
to be added to fix the issue.

Fixes: 98a276649358 ("power_supply: Add new lp8788 charger driver")
Signed-off-by: Giedrius Statkevičius &lt;giedrius.statkevicius@gmail.com&gt;
Acked-by: Milo Kim &lt;milo.kim@ti.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
