[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMrEMU8wB4c0TFTSJ4ixQg_gSnW72n_T3ip8ZfZFAk8xWjaKsA@mail.gmail.com>
Date: Fri, 3 Jan 2020 00:00:23 -0800
From: Justin Capella <justincapella@...il.com>
To: Wen Yang <wenyang@...ux.alibaba.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, xlpang@...ux.alibaba.com,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ftrace: avoid potential division by zero
> - do_div(stddev, rec->counter * (rec->counter - 1) * 1000);
>
> + stddev = div64_ul(stddev,
> + rec->counter * (rec->counter - 1) * 1000);
Is a rec->counter > 1 assertion needed here?
Powered by blists - more mailing lists