kaweth: use skb_cow_head() to deal with cloned skbs
authorEric Dumazet <edumazet@google.com>
Wed, 19 Apr 2017 16:59:26 +0000 (09:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:13:23 +0000 (10:13 +0100)
commit49cf68d70f47d951c9053d769d3976d9e1be1a25
treec22a6343c276b9ffde2f52c28006a6caff029f81
parent4307a871ce5778ff1f994ad24b3c3ec97efeaf16
kaweth: use skb_cow_head() to deal with cloned skbs

commit 39fba7835aacda65284a86e611774cbba71dac20 upstream.

We can use skb_cow_head() to properly deal with clones,
especially the ones coming from TCP stack that allow their head being
modified. This avoids a copy.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: James Hughes <james.hughes@raspberrypi.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/kaweth.c