]> Git Repo - linux.git/commit
bridge: Fix double free and memory leak around br_allowed_ingress
authorToshiaki Makita <[email protected]>
Wed, 9 Apr 2014 08:00:30 +0000 (17:00 +0900)
committerDavid S. Miller <[email protected]>
Fri, 11 Apr 2014 19:12:47 +0000 (15:12 -0400)
commiteb7076182d1ae4bc4641534134ed707100d76acc
treea4beecd9fe24c72173ecfa9adf7d125a8dd19ef0
parentdb29868653394937037d71dc3545768302dda643
bridge: Fix double free and memory leak around br_allowed_ingress

br_allowed_ingress() has two problems.

1. If br_allowed_ingress() is called by br_handle_frame_finish() and
vlan_untag() in br_allowed_ingress() fails, skb will be freed by both
vlan_untag() and br_handle_frame_finish().

2. If br_allowed_ingress() is called by br_dev_xmit() and
br_allowed_ingress() fails, the skb will not be freed.

Fix these two problems by freeing the skb in br_allowed_ingress()
if it fails.

Signed-off-by: Toshiaki Makita <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/bridge/br_input.c
net/bridge/br_vlan.c
This page took 0.067612 seconds and 4 git commands to generate.