datapath: Don't write into IPV4_TUNNEL data when using TUN_ID.
authorJesse Gross <jesse@nicira.com>
Mon, 5 Nov 2012 19:30:35 +0000 (11:30 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 7 Nov 2012 07:27:54 +0000 (23:27 -0800)
commitdee54b830c3d43facf96c129b04265f31f503200
treeaed3eacbeb825d6fe5d8dfaf09baa88b90eb7bd8
parent3f30071d5ae2532d8902ae4f2afa7076cfbfa070
datapath: Don't write into IPV4_TUNNEL data when using TUN_ID.

When the IPV4_TUNNEL action is executed, a pointer in the skb is
directly assigned the address of the action, which is protected by
RCU.  If a TUN_ID action is later executed it will write into the
action, which is not allowed by RCU.  This avoids the problem by
making a copy of the data and writing into the copy.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath/actions.c