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:18:34 +0000 (10:18 +0100)
commit6db331eb294b7d782782acf5646faa75658cab25
tree48c7258f99d350e6a1b6cc103bbcbfb61c1c7bbd
parentaf9ef8f6eb55ce5798de98a3078bc7492a2b1677
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