mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
net: deinit automatic LIST_HEAD
commit 9b5e383c11 (net: Introduce
unregister_netdevice_many()) left an active LIST_HEAD() in
rollback_registered(), with possible memory corruption.
Even if device is freed without touching its unreg_list (and therefore
touching the previous memory location holding LISTE_HEAD(single), better
close the bug for good, since its really subtle.
(Same fix for default_device_exit_batch() for completeness)
Reported-by: Michal Hocko <[email protected]>
Tested-by: Michal Hocko <[email protected]>
Reported-by: Eric W. Biderman <[email protected]>
Tested-by: Eric W. Biderman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Octavian Purdila <[email protected]>
CC: stable <[email protected]> [.33+]
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f87e6f4793
commit
ceaaec98ad
1 changed files with 2 additions and 0 deletions
|
|
@ -5066,6 +5066,7 @@ static void rollback_registered(struct net_device *dev)
|
|||
|
||||
list_add(&dev->unreg_list, &single);
|
||||
rollback_registered_many(&single);
|
||||
list_del(&single);
|
||||
}
|
||||
|
||||
unsigned long netdev_fix_features(unsigned long features, const char *name)
|
||||
|
|
@ -6219,6 +6220,7 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
|
|||
}
|
||||
}
|
||||
unregister_netdevice_many(&dev_kill_list);
|
||||
list_del(&dev_kill_list);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue