提交 8f480c0e 编写于 作者: A Arjan van de Ven 提交者: David S. Miller

net: make skb_truesize_bug() call WARN()

The truesize message check is important enough to make it print "BUG"
to the user console... lets also make it important enough to spit a
backtrace/module list etc so that kerneloops.org can track them.
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1d71da16
...@@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) ...@@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
void skb_truesize_bug(struct sk_buff *skb) void skb_truesize_bug(struct sk_buff *skb)
{ {
printk(KERN_ERR "SKB BUG: Invalid truesize (%u) " WARN(net_ratelimit(), KERN_ERR "SKB BUG: Invalid truesize (%u) "
"len=%u, sizeof(sk_buff)=%Zd\n", "len=%u, sizeof(sk_buff)=%Zd\n",
skb->truesize, skb->len, sizeof(struct sk_buff)); skb->truesize, skb->len, sizeof(struct sk_buff));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册