Commit 246a4212 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: Fix NULL pointer deref in checksum debugging.

The problem I was seeing turned out to be that skb->dev is NULL when
the checksum is being completed in user context. This happens because
the reference to the device is dropped (to allow it to be released
when packets are in the queue).

Because skb->dev was NULL, the netdev_rx_csum_fault was panicing on
deref of dev->name. How about this?
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f064a87
...@@ -1113,7 +1113,8 @@ out: ...@@ -1113,7 +1113,8 @@ out:
void netdev_rx_csum_fault(struct net_device *dev) void netdev_rx_csum_fault(struct net_device *dev)
{ {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_ERR "%s: hw csum failure.\n", dev->name); printk(KERN_ERR "%s: hw csum failure.\n",
dev ? dev->name : "<unknown>");
dump_stack(); dump_stack();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment