]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
lib/test_kmod.c: fix rmmod double free
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 30 Nov 2018 22:09:21 +0000 (14:09 -0800)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:58 +0000 (09:44 -0600)
commitdf9eecb2c85cbaa26cb0b191f0be83a46a7f6ec1
treecf05f041901b1c4317db39b3c6b1b8f67197d377
parentc4fb5a971d293b6d724b0e6a9f4e98e5dff87022
lib/test_kmod.c: fix rmmod double free

BugLink: https://bugs.launchpad.net/bugs/1836968
commit 5618cf031fecda63847cafd1091e7b8bd626cdb1 upstream.

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
lib/test_kmod.c