Commit cf659cd7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Zheng Zengkai
Browse files

lib/test: use after free in register_test_dev_kmod()

stable inclusion
from stable-v5.10.110
commit 327f07e3704c821ce33e54ef5046bdf69975cb86
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=327f07e3704c821ce33e54ef5046bdf69975cb86



--------------------------------

[ Upstream commit dc0ce6cc ]

The "test_dev" pointer is freed but then returned to the caller.

Fixes: d9c6a72d ("kmod: add test driver to stress test the module loader")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 57853ca7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment