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: <783f8711-0f90-9480-2b76-b1ffcf4c34a8@codeaurora.org>
Date:   Mon, 5 Jun 2017 11:23:53 -0600
From:   Jeffrey Hugo <jhugo@...eaurora.org>
To:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org
Cc:     Dietmar Eggemann <dietmar.eggemann@....com>,
        Austin Christ <austinwc@...eaurora.org>,
        Tyler Baicar <tbaicar@...eaurora.org>,
        Timur Tabi <timur@...eaurora.org>
Subject: Re: [PATCH V4 1/2] sched/fair: Fix load_balance() affinity redo path

On 6/2/2017 4:27 PM, Jeffrey Hugo wrote:
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index d711093..84255ab 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6737,10 +6737,10 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
>   		 * our sched_group. We may want to revisit it if we couldn't
>   		 * meet load balance goals by pulling other tasks on src_cpu.
>   		 *
> -		 * Also avoid computing new_dst_cpu if we have already computed
> -		 * one in current iteration.
> +		 * Avoid computing new_dst_cpu for NEWLY_IDLE or if we have
> +		 * already computed one in current iteration.
>   		 */
> -		if (!env->dst_grpmask || (env->flags & LBF_DST_PINNED))
> +		if (env->idle == CPU_NEWLY_IDLE || (env->flags & LBF_DST_PINNED))
>   			return 0;

Self NACK.  This breaks active_load_balance_cpu_stop().  Looks like 
env->idle == CPU_IDLE, but env->dst_grpmask is uninitialized, so it can 
be NULL, which causes a null pointer dereference a few lines later.

I'm still having a look to see what makes sense to address the issue.


-- 
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ