datapath: fix a use after free
authorLi RongQing <roy.qing.li@gmail.com>
Fri, 17 Oct 2014 13:37:51 +0000 (06:37 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Fri, 17 Oct 2014 21:51:37 +0000 (14:51 -0700)
commit10173ceaa9acb3d76688eae5554e2b61a9e7c800
treec1b17b1a58a8f351898b91eec48f331172d8e1d5
parent6bb842f6982050120ee1aa9961b2ec8c45ef7dba
datapath: fix a use after free

pskb_may_pull() called by arphdr_ok can change skb->data, so put the arp
setting after arphdr_ok to avoid the use the freed memory

Fixes: 0714812134d7d ("openvswitch: Eliminate memset() from flow_extract.")
Cc: Jesse Gross <jesse@nicira.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/flow.c