lib/test_kmod.c: fix rmmod double free
Subsystems (3)
[email protected]
maintainerPATCH 10/31 lib/test_kmod.c: fix rmmod double free
From: Luis Chamberlain <[email protected]>
Subject: lib/test_kmod.c: fix rmmod double free
We free the misc device string twice on rmmod; fix this. Without this we cannot remove the module without crashing.
Signed-off-by Luis Chamberlain <[email protected]>
Reported-by Randy Dunlap <[email protected]>
Reviewed-by Andrew Morton <[email protected]>
Cc <[email protected]> [4.12+]
Signed-off-by Andrew Morton <[email protected]>
---
lib/test_kmod.c | 1 - 1 file changed, 1 deletion(-)
lib/test_kmod.c renamed from lib/test_kmod.c~test_kmod-fix-rmmod-double-free +0 -1
@@ -1214,7 +1214,6 @@ void unregister_test_dev_kmod(struct kmodev_info (test_dev->dev,"removing interface\n" );misc_deregister (&test_dev->misc_dev); -kfree (&test_dev->misc_dev.name);mutex_unlock (&test_dev->config_mutex);mutex_unlock (&test_dev->trigger_mutex);
_