Files
linux/drivers/mfd
Krzysztof Kozlowski 81a6cff473 mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail
commit 483e2dfdbc upstream.

Fixes: 4aab3fadad ("mfd: tps65910: Move interrupt implementation code to mfd file")

tps65910_irq_init() sets 'tps65910->chip_irq' before calling
regmap_add_irq_chip(). If the regmap_add_irq_chip() call fails in
memory allocation of regmap_irq_chip_data members then:

1. The 'tps65910->chip_irq' will still hold some value
2. 'tps65910->irq_data' will be pointing to already freed memory
   (because regmap_add_irq_chip() will free it on error)

This results in invalid memory access during driver remove because the
tps65910_irq_exit() tests whether 'tps65910->chip_irq' is not zero.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
..
2012-11-28 12:22:27 -08:00
2013-04-05 11:20:14 +02:00
2012-11-28 12:22:27 -08:00
2013-04-05 11:20:13 +02:00
2012-11-28 12:22:27 -08:00
2013-04-08 17:25:28 +02:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:20:19 -08:00
2012-11-28 12:22:27 -08:00
2012-09-23 20:51:34 +02:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2013-04-19 00:45:20 +02:00
2013-02-14 00:22:59 +01:00
2013-04-19 18:29:18 +02:00
2013-04-19 18:29:18 +02:00
2013-04-19 18:40:05 +02:00
2012-11-28 12:22:27 -08:00
2013-04-08 17:28:29 +02:00
2013-04-09 12:18:16 +02:00
2013-04-08 17:25:29 +02:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:22:27 -08:00
2013-02-14 00:22:54 +01:00
2012-11-28 12:22:27 -08:00
2013-04-08 17:25:27 +02:00
2012-11-28 12:22:27 -08:00
2012-11-28 12:20:19 -08:00