Thread (7 messages) 7 messages, 2 authors, 2013-07-01

Re: skbuff: skb_under_panic warning in 3.10rc7+

From: Hannes Frederic Sowa <hidden>
Date: 2013-07-01 08:24:41

On Mon, Jul 01, 2013 at 01:23:08AM +0200, Hannes Frederic Sowa wrote:
I'll look at it again tomorrow.
[Cc Gao feng because of commit 0c1833797a5a6ec23ea9261d979aa18078720b74
("ipv6: fix incorrect ipsec fragment")]

Just a small update:

The following diff fixes the UDP_CORK case for me. I just traced the various
len variables and brought ip6_append_data_mtu in line with the initial
initialization when the first call to ip6_append_data happens.

I'll have to do more research on this and check if this correlates
somehow with Dave's report.
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1097,7 +1097,9 @@ static void ip6_append_data_mtu(int *mtu,
                                int *maxfraglen,
                                unsigned int fragheaderlen,
                                struct sk_buff *skb,
-                               struct rt6_info *rt)
+                               struct rt6_info *rt,
+                               __u32 frag_size,
+                               bool pmtudisc)
 {
        if (!(rt->dst.flags & DST_XFRM_TUNNEL)) {
                if (skb == NULL) {
@@ -1109,7 +1111,9 @@ static void ip6_append_data_mtu(int *mtu,
                         * this fragment is not first, the headers
                         * space is regarded as data space.
                         */
-                       *mtu = dst_mtu(rt->dst.path);
+                       *mtu = pmtudisc ? rt->dst.dev->mtu : dst_mtu(rt->dst.path);
+                       if (frag_size && frag_size < *mtu)
+                               *mtu = frag_size;
                }
                *maxfraglen = ((*mtu - fragheaderlen) & ~7)
                              + fragheaderlen - sizeof(struct frag_hdr);
@@ -1287,7 +1291,8 @@ alloc_new_skb:
                        /* update mtu and maxfraglen if necessary */
                        if (skb == NULL || skb_prev == NULL)
                                ip6_append_data_mtu(&mtu, &maxfraglen,
-                                                   fragheaderlen, skb, rt);
+                                               fragheaderlen, skb, rt, np->frag_size,
+                                               np->pmtudisc == IPV6_PMTUDISC_PROBE);
 
                        skb_prev = skb;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help