[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1209924962.3655.8.camel@johannes.berg>
Date: Sun, 04 May 2008 20:16:02 +0200
From: Johannes Berg <johannes@...solutions.net>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Herbert Xu <herbert@...dor.apana.org.au>
Subject: [RFC/T] [NET] make pskb_expand_head warn when called with invalid
state
This makes pskb_expand_head warn when called when a socket is attached.
Signed-off-by: Johannes Berg <johannes@...solutions.net>
---
Based on a different patch by davem.
Will also trigger with mac80211.
net/core/skbuff.c | 2 ++
1 file changed, 2 insertions(+)
--- everything.orig/net/core/skbuff.c 2008-05-04 01:18:49.000000000 +0200
+++ everything/net/core/skbuff.c 2008-05-04 01:23:50.000000000 +0200
@@ -689,6 +689,8 @@ int pskb_expand_head(struct sk_buff *skb
if (!data)
goto nodata;
+ WARN_ON((nhead || ntail) && skb->sk);
+
/* Copy only real data... and, alas, header. This should be
* optimized for the cases when header is void. */
#ifdef NET_SKBUFF_DATA_USES_OFFSET
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists