* [patch 10/31] lib/test_kmod.c: fix rmmod double free
@ 2018-11-30 22:09 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2018-11-30 22:09 UTC (permalink / raw)
To: stable, rdunlap, mcgrof, akpm, mm-commits, torvalds
From: Luis Chamberlain <mcgrof@kernel.org>
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.
Link: http://lkml.kernel.org/r/20181124050500.5257-1-mcgrof@kernel.org
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org> [4.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/test_kmod.c | 1 -
1 file changed, 1 deletion(-)
--- a/lib/test_kmod.c~test_kmod-fix-rmmod-double-free
+++ a/lib/test_kmod.c
@@ -1214,7 +1214,6 @@ void unregister_test_dev_kmod(struct kmo
dev_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);
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-01 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 22:09 [patch 10/31] lib/test_kmod.c: fix rmmod double free akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).