sr9700: use skb_cow_head() to deal with cloned skbs
authorEric Dumazet <edumazet@google.com>
Wed, 19 Apr 2017 16:59:23 +0000 (09:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:38:52 +0000 (09:38 +0100)
commitab4fd7a2ddc5d558b616cf09ff6fb5de1cafb7e8
tree48639e8e528bb76ae3a33e18f512a9c567e50a92
parent542bcc549379e43c1de75a510ea4eb8b9badd918
sr9700: use skb_cow_head() to deal with cloned skbs

commit d532c1082f68176363ed766d09bf187616e282fe upstream.

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: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
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: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/sr9700.c