]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sch_dsmark: fix invalid skb_cow() usage
authorEric Dumazet <edumazet@google.com>
Fri, 17 Mar 2017 15:05:28 +0000 (08:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 00:21:27 +0000 (17:21 -0700)
commitaea92fb2e09e29653b023d4254ac9fbf94221538
tree146bf8ca4cb9b88ca710c379a317e7135db667f2
parent09050957fae896e001498af1aa35c446a11cb47d
sch_dsmark: fix invalid skb_cow() usage

skb_cow(skb, sizeof(ip header)) is not very helpful in this context.

First we need to use pskb_may_pull() to make sure the ip header
is in skb linear part, then use skb_try_make_writable() to
address clones issues.

Fixes: 4c30719f4f55 ("[PKT_SCHED] dsmark: handle cloned and non-linear skb's")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_dsmark.c