]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mac80211_hwsim: fix module init error paths for netlink
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 5 Oct 2018 20:22:06 +0000 (23:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:09:51 +0000 (14:09 +0100)
commita33ba2d2aa7e28be3773e0787ddcdbb754717449
tree3d68c5c45ba5f6cae383ecdca5a5c89eac3a9d5b
parent9cdcdad4c2ff0ee42fe6004322f15745c3b749c8
mac80211_hwsim: fix module init error paths for netlink

[ Upstream commit 05cc09de4c017663a217630682041066f2f9a5cd ]

There is no unregister netlink notifier and family on error paths
in init_mac80211_hwsim(). Also there is an error path where
hwsim_class is not destroyed.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 62759361eb49 ("mac80211-hwsim: Provide multicast event for HWSIM_CMD_NEW_RADIO")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mac80211_hwsim.c