vlan: unable to rmmod 8021q due to netdevice reference leak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
[Impact]
In some conditions, is not possible to remove the vlan module due to a netdevice reference leak.
The problem has been fixed in linux v5.17 with commit d6ff94afd90b ("vlan: move dev_put into vlan_dev_uninit").
https:/
This commit has been backported in linux 5.15.142:
https:/
To avoid conflict, the following commit was also backported right before:
https:/
[Test Case]
As described in the commit, it is simple to reproduce the issue. Simply create a dummy, a vlan on top of it, and a vlan on top of the previously created vlan, then try to remove the 8021q module.
ip link add dummy0 type dummy
ip link add link dummy0 name dummy0.1 type vlan id 1
ip link add link dummy0.1 name dummy0.1.2 type vlan id 2
rmmod 8021q
[freeze]
unregister_
[Regression Potential]
These 2 patches are quite simple. They have been backported in the official 5.15 stable. The risk of regression should be contained.