lan78xx: use skb_cow_head() to deal with cloned skbs
authorEric Dumazet <edumazet@google.com>
Wed, 19 Apr 2017 16:59:24 +0000 (09:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2017 17:24:05 +0000 (13:24 -0400)
commitd4ca73591916b760478d2b04334d5dcadc028e9c
tree57cd58dfbbf01ec294e910ae3f0ad9f76ebbbd0a
parentd532c1082f68176363ed766d09bf187616e282fe
lan78xx: use skb_cow_head() to deal with cloned skbs

We need to ensure there is enough headroom to push extra header,
but we also need to check if we are allowed to change headers.

skb_cow_head() is the proper helper to deal with this.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: James Hughes <james.hughes@raspberrypi.org>
Cc: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c