]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitda782af99c9de627101d9dadf1c2dfe2b8b99dc8
tree57cd58dfbbf01ec294e910ae3f0ad9f76ebbbd0a
parentd5c0c99c0e7e9e4004044f9dc36f818eb7adf3b5
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: f98af78833e9 ("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