LKML Archive on
 help / Atom feed
* [PATCH] test_kmod: fix rmmod double free
@ 2018-11-24  5:05 Luis Chamberlain
  0 siblings, 0 replies; 1+ messages in thread
From: Luis Chamberlain @ 2018-11-24  5:05 UTC (permalink / raw)
  To: akpm; +Cc: rdunlap, linux-kernel, Luis Chamberlain, stable

We double free the misc device string twice on rmmod, fix this.
Without this we cannot remove the module without crashing.

Cc: <>      # for v4.12 and up
Reported-by: Randy Dunlap <>
Signed-off-by: Luis Chamberlain <>
 lib/test_kmod.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/test_kmod.c b/lib/test_kmod.c
index e3ddd836491f..d82d022111e0 100644
--- a/lib/test_kmod.c
+++ b/lib/test_kmod.c
@@ -1214,7 +1214,6 @@ void unregister_test_dev_kmod(struct kmod_test_device *test_dev)
 	dev_info(test_dev->dev, "removing interface\n");
-	kfree(&test_dev->;

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24  5:05 [PATCH] test_kmod: fix rmmod double free Luis Chamberlain

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox