mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211.
when modprobe and removing rtl8187se ( just for testing, i do not have that card , and oops and a memory poison error happens on the builtin ieee80211 of that driver. I dont know if they will port it to the current ieeee80221 instead of the builtin ones, but just in case i attach a proposed fix for that problem. - Change for loop on ieee80211_crypto_deinit for list_for_each_safe to remove items. Is there an spinlock needed here? - Call ieee80211_crypto_deinit after exiting all registerd crypto protocols. Signed-off-by: Costantino Leandro <lcostantino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
69e09c983e
commit
096c55d1de
@ -234,20 +234,21 @@ out:
|
|||||||
void ieee80211_crypto_deinit(void)
|
void ieee80211_crypto_deinit(void)
|
||||||
{
|
{
|
||||||
struct list_head *ptr, *n;
|
struct list_head *ptr, *n;
|
||||||
|
struct ieee80211_crypto_alg *alg = NULL;
|
||||||
|
|
||||||
if (hcrypt == NULL)
|
if (hcrypt == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs;
|
list_for_each_safe(ptr, n, &hcrypt->algs) {
|
||||||
ptr = n, n = ptr->next) {
|
alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
|
||||||
struct ieee80211_crypto_alg *alg =
|
if (alg) {
|
||||||
(struct ieee80211_crypto_alg *) ptr;
|
list_del(ptr);
|
||||||
list_del(ptr);
|
printk(KERN_DEBUG
|
||||||
printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
|
"ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
|
||||||
"'%s' (deinit)\n", alg->ops->name);
|
alg->ops->name);
|
||||||
kfree(alg);
|
kfree(alg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(hcrypt);
|
kfree(hcrypt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6161,10 +6161,10 @@ static void __exit rtl8180_pci_module_exit(void)
|
|||||||
{
|
{
|
||||||
pci_unregister_driver (&rtl8180_pci_driver);
|
pci_unregister_driver (&rtl8180_pci_driver);
|
||||||
rtl8180_proc_module_remove();
|
rtl8180_proc_module_remove();
|
||||||
ieee80211_crypto_deinit();
|
|
||||||
ieee80211_crypto_tkip_exit();
|
ieee80211_crypto_tkip_exit();
|
||||||
ieee80211_crypto_ccmp_exit();
|
ieee80211_crypto_ccmp_exit();
|
||||||
ieee80211_crypto_wep_exit();
|
ieee80211_crypto_wep_exit();
|
||||||
|
ieee80211_crypto_deinit();
|
||||||
DMESG("Exiting");
|
DMESG("Exiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user