lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1311110290.2617.3.camel@laptop>
Date:	Tue, 19 Jul 2011 23:18:10 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Terry Loftin <terry.loftin@...com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Bob Montgomery <bob.montgomery@...com>
Subject: Re: [PATCH 2/2] sched: Fix "divide error: 0000" in
 find_busiest_group

On Tue, 2011-07-19 at 14:58 -0600, Terry Loftin wrote:
> Add a check to sched_avg_update() to detect and reset age_stamp if the
> clock value has wrapped.  Because __cycles_2_ns() includes an offset
> to account for start up time, the clock may not wrap to zero, so use
> the current clock value instead.

So you're running on a platform (unspecified) where we use a raw
sched_clock() that is buggy. Again, you're fixing symptoms not causes. 

> Signed-off-by: Terry Loftin <terry.loftin@...com>
> Signed-off-by: Bob Montgomery <bob.montgomery@...com>
> ---
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 18d38e4..b39cae1 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -1256,6 +1256,8 @@ static void sched_avg_update(struct rq *rq)
>  {
>  	s64 period = sched_avg_period();
> 
> +	if (unlikely(rq->age_stamp > rq->clock))
> +		rq->age_stamp = rq->clock;
>  	while ((s64)(rq->clock - rq->age_stamp) > period) {
>  		/*
>  		 * Inline assembly required to prevent the compiler



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ