]> 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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2013 21:27:28 +0000 (17:27 -0400)
commit4a7df340ed1bac190c124c1601bfc10cde9fb4fb
tree40d9d03a585e344d405d25648a5336d9b92721dc
parent9979a55a833883242e3a29f3596676edd7199c46
8021q: fix a potential use-after-free

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.

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