diff options
author | 2014-09-29 13:29:15 -0700 | |
---|---|---|
committer | 2014-10-01 16:34:25 -0400 | |
commit | d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef (patch) | |
tree | 1ba29128caa07307632b6219c1692308ec89983a /net/xfrm/xfrm_policy.c | |
parent | tcp: abort orphan sockets stalling on zero window probes (diff) | |
download | linux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.tar.gz linux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.tar.bz2 linux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.zip |
net: cleanup and document skb fclone layout
Lets use a proper structure to clearly document and implement
skb fast clones.
Then, we might experiment more easily alternative layouts.
This patch adds a new skb_fclone_busy() helper, used by tcp and xfrm,
to stop leaking of implementation details.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index f623dca6ce30..4c4e457e7888 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1961,10 +1961,8 @@ static int xdst_queue_output(struct sock *sk, struct sk_buff *skb) struct xfrm_dst *xdst = (struct xfrm_dst *) dst; struct xfrm_policy *pol = xdst->pols[0]; struct xfrm_policy_queue *pq = &pol->polq; - const struct sk_buff *fclone = skb + 1; - if (unlikely(skb->fclone == SKB_FCLONE_ORIG && - fclone->fclone == SKB_FCLONE_CLONE)) { + if (unlikely(skb_fclone_busy(skb))) { kfree_skb(skb); return 0; } |