Files
linux-stable-mirror/lib
Johan Hovold e5400e8272 lib/genalloc: fix device leak in of_gen_pool_get()
commit 1260cbcffa upstream.

Make sure to drop the reference taken when looking up the genpool platform
device in of_gen_pool_get() before returning the pool.

Note that holding a reference to a device does typically not prevent its
devres managed resources from being released so there is no point in
keeping the reference.

Link: https://lkml.kernel.org/r/20250924080207.18006-1-johan@kernel.org
Fixes: 9375db07ad ("genalloc: add devres support, allow to find a managed pool by device")
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: <stable@vger.kernel.org>	[3.10+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-19 16:33:51 +02:00
..
2024-07-12 16:39:53 -07:00
2024-04-25 21:07:06 -07:00
2024-04-25 21:07:05 -07:00
2024-07-04 23:43:10 -07:00
2024-02-15 12:17:28 -05:00
2024-09-03 21:15:42 -07:00