Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2798eb4 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by David S. Miller
Browse files

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: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3732e9bd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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();