You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
lib/test: use after free in register_test_dev_kmod()
[ Upstream commitdc0ce6cc4b] The "test_dev" pointer is freed but then returned to the caller. Fixes:d9c6a72d6f("kmod: add test driver to stress test the module loader") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00d2b9fe5e
commit
327f07e370
@@ -1155,6 +1155,7 @@ static struct kmod_test_device *register_test_dev_kmod(void)
|
||||
if (ret) {
|
||||
pr_err("could not register misc device: %d\n", ret);
|
||||
free_test_dev_kmod(test_dev);
|
||||
test_dev = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user