mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Don't to forget to unlock the rwlock on trunk before destroying it.
This should fix panic on "kldunload if_vlan" while vlanX are still there. Reviewed by: glebius
This commit is contained in:
parent
f9ad25aace
commit
33499e2ae5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155986
@ -379,9 +379,10 @@ trunk_destroy(struct ifvlantrunk *trunk)
|
||||
#ifndef VLAN_ARRAY
|
||||
vlan_freehash(trunk);
|
||||
#endif
|
||||
TRUNK_LOCK_DESTROY(trunk);
|
||||
LIST_REMOVE(trunk, trunk_entry);
|
||||
trunk->parent->if_vlantrunk = NULL;
|
||||
LIST_REMOVE(trunk, trunk_entry);
|
||||
TRUNK_UNLOCK(trunk);
|
||||
TRUNK_LOCK_DESTROY(trunk);
|
||||
free(trunk, M_VLAN);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user