bpf: try harder on clones when writing into skb
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 19 Feb 2016 22:05:25 +0000 (23:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jul 2016 16:31:12 +0000 (09:31 -0700)
commitb30cc5b14fc0981a613969bfa048aa706347d1c3
tree603b161243195cfd727e7759aeb17035109632e6
parent999e0d18786192faf8240a5048dd1a08cf5d4bd0
bpf: try harder on clones when writing into skb

[ Upstream commit 3697649ff29e0f647565eed04b27a7779c646a22 ]

When we're dealing with clones and the area is not writeable, try
harder and get a copy via pskb_expand_head(). Replace also other
occurences in tc actions with the new skb_try_make_writable().

Reported-by: Ashhad Sheikh <ashhadsheikh394@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/skbuff.h
net/core/filter.c
net/sched/act_csum.c
net/sched/act_nat.c