]> git.baikalelectronics.ru Git - 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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jan 2022 17:01:25 +0000 (09:01 -0800)
commit31746bed6634a1daf939f4e8092ddff7adea4efc
tree7b16cd5de1808b0d38324076e259dba36c4d684f
parent259187704c6051544505be37846d6cc6662de085
net: bridge: vlan: fix memory leak in __allowed_ingress

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: 17b655fb80be ("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>
net/bridge/br_vlan.c