diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-08-13 20:12:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-13 20:12:58 -0700 |
commit | e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (patch) | |
tree | 7313e7994ed8dbeb47ca454ee7c53d45e040738d /net/ipv4/ip_output.c | |
parent | dcb7cd97f133f7cfbd181149a1e60215a869f895 (diff) | |
download | kernel_samsung_smdk4412-e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3.zip kernel_samsung_smdk4412-e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3.tar.gz kernel_samsung_smdk4412-e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3.tar.bz2 |
[INET]: Use pskb_trim_unique when trimming paged unique skbs
The IPv4/IPv6 datagram output path was using skb_trim to trim paged
packets because they know that the packet has not been cloned yet
(since the packet hasn't been given to anything else in the system).
This broke because skb_trim no longer allows paged packets to be
trimmed. Paged packets must be given to one of the pskb_trim functions
instead.
This patch adds a new pskb_trim_unique function to cover the IPv4/IPv6
datagram output path scenario and replaces the corresponding skb_trim
calls with it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 9bf307a..4c20f55 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -947,7 +947,7 @@ alloc_new_skb: skb_prev->csum = csum_sub(skb_prev->csum, skb->csum); data += fraggap; - skb_trim(skb_prev, maxfraglen); + pskb_trim_unique(skb_prev, maxfraglen); } copy = datalen - transhdrlen - fraggap; @@ -1142,7 +1142,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, data, fraggap, 0); skb_prev->csum = csum_sub(skb_prev->csum, skb->csum); - skb_trim(skb_prev, maxfraglen); + pskb_trim_unique(skb_prev, maxfraglen); } /* |