aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-08 18:21:39 -0500
committerDavid S. Miller <davem@davemloft.net>2005-12-08 18:21:39 -0500
commit246a421207007a034da9b8cfa578bc00d16a9553 (patch)
treec9703c0c19784f39b8a11a60e63499df2c388419 /net
parent1f064a87c80c86bd3878e6633de61e8b71aa6788 (diff)
[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: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 0b48e294aaf..a5efc9ae010 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1113,7 +1113,8 @@ out:
1113void netdev_rx_csum_fault(struct net_device *dev) 1113void netdev_rx_csum_fault(struct net_device *dev)
1114{ 1114{
1115 if (net_ratelimit()) { 1115 if (net_ratelimit()) {
1116 printk(KERN_ERR "%s: hw csum failure.\n", dev->name); 1116 printk(KERN_ERR "%s: hw csum failure.\n",
1117 dev ? dev->name : "<unknown>");
1117 dump_stack(); 1118 dump_stack();
1118 } 1119 }
1119} 1120}