]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
8021q: delete cleared egress QoS mappings
authorLongxuan Yu <ylong030@ucr.edu>
Mon, 20 Apr 2026 03:18:46 +0000 (11:18 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Apr 2026 10:13:57 +0000 (12:13 +0200)
commit7dddc74af369478ba7f9bc136d0fc1dc4570cb66
treee6718a58a149331b8fa1742cfe32f116327c1cc6
parentfc69decc811b155a0ed8eef17ee940f28c4f6dbc
8021q: delete cleared egress QoS mappings

vlan_dev_set_egress_priority() currently keeps cleared egress
priority mappings in the hash as tombstones. Repeated set/clear cycles
with distinct skb priorities therefore accumulate mapping nodes until
device teardown and leak memory.

Delete mappings when vlan_prio is cleared instead of keeping tombstones.
Now that the egress mapping lists are RCU protected, the node can be
unlinked safely and freed after a grace period.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@kernel.org
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Longxuan Yu <ylong030@ucr.edu>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Link: https://patch.msgid.link/ecfa6f6ce2467a42647ff4c5221238ae85b79a59.1776647968.git.yuantan098@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/8021q/vlan_dev.c
net/8021q/vlan_netlink.c