From: Xiao Guangrong Date: Sun, 30 Aug 2009 20:10:43 +0000 (+0000) Subject: drop_monitor: fix trace_napi_poll_hit() X-Git-Tag: v2.6.32-rc1~703^2~154 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f2798eb4e01b095f273f4bf40f511c9d69c0e1da;p=karo-tx-linux.git drop_monitor: fix trace_napi_poll_hit() The net_dev of backlog napi is NULL, like below: __get_cpu_var(softnet_data).backlog.dev == NULL So, we should check it in napi tracepoint's probe function Acked-by: Neil Horman Signed-off-by: Xiao Guangrong Signed-off-by: David S. Miller --- diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 9d66fa953ab7..d31120248c03 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -182,7 +182,8 @@ static void trace_napi_poll_hit(struct napi_struct *napi) /* * Ratelimit our check time to dm_hw_check_delta jiffies */ - if (!time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta)) + if (!napi->dev || + !time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta)) return; rcu_read_lock();