]> git.karo-electronics.de Git - karo-tx-linux.git/commit
8021q: fix a potential use-after-free
authorCong Wang <amwang@redhat.com>
Fri, 22 Mar 2013 19:14:07 +0000 (19:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 17:04:38 +0000 (10:04 -0700)
commita83417946df6c57fbb4d4383c992c5ffd59b56c2
treeb3f4589670a0d6846f498628eb76f4d881cf44ff
parentd1f60c6d91df21978218af4f5442993749ecbf7e
8021q: fix a potential use-after-free

[ Upstream commit 4a7df340ed1bac190c124c1601bfc10cde9fb4fb ]

vlan_vid_del() could possibly free ->vlan_info after a RCU grace
period, however, we may still refer to the freed memory area
by 'grp' pointer. Found by code inspection.

This patch moves vlan_vid_del() as behind as possible.

Signed-off-by: Cong Wang <amwang@redhat.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/8021q/vlan.c