aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2009-08-30 16:10:43 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 21:18:12 -0400
commitf2798eb4e01b095f273f4bf40f511c9d69c0e1da (patch)
tree480235ce9efabae5c0142617affa7a4b510ccf3a /net/core
parent3732e9bd2d841db588624b1bf560bfc9d0dcb1fd (diff)
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 <nhorman@tuxdriver.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/drop_monitor.c3
1 files changed, 2 insertions, 1 deletions
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)
182 /* 182 /*
183 * Ratelimit our check time to dm_hw_check_delta jiffies 183 * Ratelimit our check time to dm_hw_check_delta jiffies
184 */ 184 */
185 if (!time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta)) 185 if (!napi->dev ||
186 !time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
186 return; 187 return;
187 188
188 rcu_read_lock(); 189 rcu_read_lock();