]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: bridge: vlan: fix memory leak in __allowed_ingress
authorTim Yi <tim.yi@pica8.com>
Thu, 27 Jan 2022 07:49:53 +0000 (15:49 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 3 Feb 2022 09:28:55 +0000 (10:28 +0100)
commit0f6d2469ddd8c481c9471cb62d411f4f1862fa57
treef279ff90439d4828d908a93fa20ad01ed21f0660
parent99b7460d732253902076c7da3a394b0975c4bb25
net: bridge: vlan: fix memory leak in __allowed_ingress

BugLink: https://bugs.launchpad.net/bugs/1959879
[ Upstream commit fd20d9738395cf8e27d0a17eba34169699fccdff ]

When using per-vlan state, if vlan snooping and stats are disabled,
untagged or priority-tagged ingress frame will go to check pvid state.
If the port state is forwarding and the pvid state is not
learning/forwarding, untagged or priority-tagged frame will be dropped
but skb memory is not freed.
Should free skb when __allowed_ingress returns false.

Fixes: a580c76d534c ("net: bridge: vlan: add per-vlan state")
Signed-off-by: Tim Yi <tim.yi@pica8.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/r/20220127074953.12632-1-tim.yi@pica8.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/bridge/br_vlan.c