]> git.proxmox.com Git - ovs.git/commit
datapath: Update inner offsets when expanding headroom.
authorJesse Gross <jesse@nicira.com>
Tue, 31 Mar 2015 16:19:58 +0000 (09:19 -0700)
committerJesse Gross <jesse@nicira.com>
Mon, 13 Apr 2015 20:52:24 +0000 (13:52 -0700)
commita75776e6091b8597d966bc1a1cabb150a2de08f0
treeaf0016d51b260197618586c634a97521ec0ec8aa
parent64d15689a841c02df0762c3b17da4246e4fb62de
datapath: Update inner offsets when expanding headroom.

skb protocol offsets are relative to the beginning of the
buffer and therefore must be updated if the buffer size is
expanded. Kernel functions do this automatically for existing
fields but obviously not for anything that we backport. This
introduces a wrapper for pskb_expand_head() to update the
inner protocol fields that we have backported.

Without this, a kernel crash can be triggered with tunnel
packets that do not have enough headroom and need to be
segmented. pskb_expand_head() is called in directly through
skb_cow_head() at the beginning of each of the tunnel transmit
routines.

Reported-by: Yinpeijun <yinpeijun@huawei.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/linux/compat/gso.h
datapath/linux/compat/include/linux/skbuff.h
datapath/linux/compat/skbuff-openvswitch.c