lkml.org 
[lkml]   [2015]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/38] arm-cci: fix handling cpumask_any_but return value
From
Date
Hi,

Ping - almost three months passed.

Regards
Andrzej

On 09/21/2015 03:33 PM, Andrzej Hajda wrote:
> cpumask_any_but returns value >= nr_cpu_ids if there are no more CPUs.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/bus/arm-cci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> index 577cc4b..22754d0 100644
> --- a/drivers/bus/arm-cci.c
> +++ b/drivers/bus/arm-cci.c
> @@ -1314,7 +1314,7 @@ static int cci_pmu_cpu_notifier(struct notifier_block *self,
> if (!cpumask_test_and_clear_cpu(cpu, &cci_pmu->cpus))
> break;
> target = cpumask_any_but(cpu_online_mask, cpu);
> - if (target < 0) // UP, last CPU
> + if (target >= nr_cpu_ids) // UP, last CPU
> break;
> /*
> * TODO: migrate context once core races on event->ctx have



\
 
 \ /
  Last update: 2015-12-14 12:01    [W:0.048 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site