smsc95xx: Use skb_cow_head to deal with cloned skbs
authorJames Hughes <james.hughes@raspberrypi.org>
Wed, 19 Apr 2017 10:13:40 +0000 (11:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:18:33 +0000 (10:18 +0100)
commit0ae3bc117c859c9956c0d6f1fb3c3a853c2f5f64
tree3e2cdecaabf5bc85f83d3d84a7f55933d63308ed
parent5b3b651fe952fd114b7cb151cee53c2aaaf1ab2c
smsc95xx: Use skb_cow_head to deal with cloned skbs

commit e9156cd26a495a18706e796f02a81fee41ec14f4 upstream.

The driver was failing to check that the SKB wasn't cloned
before adding checksum data.
Replace existing handling to extend/copy the header buffer
with skb_cow_head.

Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Woojung Huh <Woojung.Huh@microchip.com>
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/smsc95xx.c