[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190214115855.76869aecd777fbd37d48f45c@linux-foundation.org>
Date: Thu, 14 Feb 2019 11:58:55 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ćukasz Siudut <lsiudut@...com>,
linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH] psi: avoid divide-by-zero crash inside virtual machines
On Thu, 14 Feb 2019 14:31:57 -0500 Johannes Weiner <hannes@...xchg.org> wrote:
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -322,7 +322,7 @@ static bool update_stats(struct psi_group *group)
> expires = group->next_update;
> if (now < expires)
> goto out;
> - if (now - expires > psi_period)
> + if (now - expires >= psi_period)
> missed_periods = div_u64(now - expires, psi_period);
>
> /*
It seems appropriate to use time_after64() and friends in this code.
Powered by blists - more mailing lists