]> git.kernelconcepts.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:16:53 +0000 (10:16 -0700)
commit9829fe9806e22d7a822f4c947cc432c8d1774b54
tree8aa2ed1051980d96793b92b34663bcc8910fba4d
parent01326198867ce1ab1bb26acb48de7b06eab571fe
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