Files
Tze Yee Ng 95f702e372 firmware: stratix10-svc: fix memory leaks and list corruption bugs
[ Upstream commit 9119ceb76e ]

Fix a memory leak when gen_pool_alloc() fails by freeing pmem on the error
path. Switch pmem allocation from devm_kzalloc() to kzalloc() with
explicit kfree() in the free path to match its list-managed lifetime.
Remove the erroneous list_del(&svc_data_mem) which corrupted the list head
on failed lookups.

Fixes: 7ca5ce8965 ("firmware: add Intel Stratix10 service layer driver")
Cc: stable@vger.kernel.org#5.0+
Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
(cherry picked from commit 9119ceb76e)
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-08-09 20:22:01 +02:00
..
…
…
…
…
…
…
…
…
…
…
…