Skip to content

Commit f2798eb

Browse files
Xiao Guangrongdavem330
authored andcommitted
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>
1 parent 3732e9b commit f2798eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/core/drop_monitor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ static void trace_napi_poll_hit(struct napi_struct *napi)
182182
/*
183183
* Ratelimit our check time to dm_hw_check_delta jiffies
184184
*/
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))
186187
return;
187188

188189
rcu_read_lock();

0 commit comments

Comments
 (0)