|
@@ -281,7 +281,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
|
|
|
{
|
|
|
struct net *net = container_of(fq->q.net, struct net, ipv6.frags);
|
|
|
struct sk_buff *fp, *head = fq->q.fragments;
|
|
|
- int payload_len;
|
|
|
+ int payload_len, delta;
|
|
|
unsigned int nhoff;
|
|
|
int sum_truesize;
|
|
|
u8 ecn;
|
|
@@ -322,10 +322,16 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
|
|
|
if (payload_len > IPV6_MAXPLEN)
|
|
|
goto out_oversize;
|
|
|
|
|
|
+ delta = - head->truesize;
|
|
|
+
|
|
|
/* Head of list must not be cloned. */
|
|
|
if (skb_unclone(head, GFP_ATOMIC))
|
|
|
goto out_oom;
|
|
|
|
|
|
+ delta += head->truesize;
|
|
|
+ if (delta)
|
|
|
+ add_frag_mem_limit(fq->q.net, delta);
|
|
|
+
|
|
|
/* If the first fragment is fragmented itself, we split
|
|
|
* it to two chunks: the first with data and paged part
|
|
|
* and the second, holding only fragments. */
|