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:42:34 +0000 (23:42 -0800)
commit5a89c8ec5ed1e32a6af718d20fdbaaf351493422
tree872a28a03fac8b6b8c6c2931dd5e92afd01bc99d
parenta5ef37b8bcbc19650cf5d123505936cdd5e405c2
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