From: Herbert Xu <herbert@gondor.apana.org.au> Date: Thu, 01 May 2008 18:36:49 +0800That makes more sense, good catch Herbert. I guess it's the pskb_expand_head() calls done by net/mac80211/tx.c I suspect we'll need to orphan early in order to accomodate these adjustments, otherwise socket memory buffer allocations will be corrupted. Once that is cured, I think we can detect this better, by adding a carefully constructed assertion to pskb_expand_head(). Basically, the idea is, if "nhead" or "ntail" are non-zero, and there is a socket still attached to the SKB, print a warning message. Something like: diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 4fe605f..9bfca08 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -699,6 +699,12 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, if (skb_shared(skb)) BUG(); + if (unlikely((nhead || ntail) && skb->sk)) { + printk(KERN_ERR "SKB BUG: Illegal pskb expand (%d:%d) " + "with socket attached\n", + nhead, ntail); + } + size = SKB_DATA_ALIGN(size); data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
