[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090827124628.GA4762@hmsreliant.think-freely.org>
Date: Thu, 27 Aug 2009 08:46:28 -0400
From: Neil Horman <nhorman@...driver.com>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
David Miller <davem@...emloft.net>,
Wei Yongjun <yjwei@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/3] drop_monitor: fix trace_napi_poll_hit()
On Thu, Aug 27, 2009 at 06:40:08PM +0800, Xiao Guangrong wrote:
> 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
>
> Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
> ---
> net/core/drop_monitor.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> index 9d66fa9..d311202 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();
> --
> 1.6.1.2
>
>
Acked-by: Neil Horman <nhorman@...driver.com>
Thanks!
Neil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists