Dan Carpenter 0c79abee60 mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
[ Upstream commit 26783d74cc6a440ee3ef9836a008a697981013d0 ]

The "req" struct is always added to the "wm831x->auxadc_pending" list,
but it's only removed from the list on the success path.  If a failure
occurs then the "req" struct is freed but it's still on the list,
leading to a use after free.

Fixes: 78bb3688ea18 ("mfd: Support multiple active WM831x AUXADC conversions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:33 +01:00
..
2019-08-14 09:07:20 +01:00
2019-07-15 20:18:40 -07:00
2019-07-15 20:18:40 -07:00
2019-07-15 20:18:40 -07:00
2019-07-02 12:11:31 +01:00
2019-07-02 12:11:31 +01:00
2019-07-02 12:11:31 +01:00
2019-07-15 20:18:40 -07:00
2019-09-23 19:37:49 -07:00
2019-07-15 20:18:40 -07:00
2017-07-18 08:27:18 +01:00
2020-10-29 09:57:43 +01:00
2019-01-16 13:59:34 +00:00
2019-07-09 08:59:39 -07:00