lkml.org 
[lkml]   [2016]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] rcu: tree: correctly handle sparse possible CPUs
From
2016-05-16 19:48 GMT+03:00 Mark Rutland <mark.rutland@arm.com>:

> /*
> + * Iterate over all possible CPUs in a leaf RCU node.
> + */
> +#define for_each_leaf_node_possible_cpu(rnp, cpu) \
> + for ((cpu) = rnp->grplo; \
> + cpu <= rnp->grphi; \
> + cpu = cpumask_next((cpu), cpu_possible_mask))
> +
> +/*
> + * Iterate over all possible CPUs in a leaf RCU node, at each step providing a
> + * bit for comparison against rcu_node bitmasks.
> + */
> +#define for_each_leaf_node_possible_cpu_bit(rnp, cpu, bit) \
> + for ((cpu) = rnp->grplo, (bit) = 1; \
> + cpu <= rnp->grphi; \
> + cpu = cpumask_next((cpu), cpu_possible_mask), \
> + (bit) = 1UL << (cpu - rnp->grplo))
> +


[ 0.163652] UBSAN: Undefined behaviour in ../kernel/rcu/tree.c:2912:3
[ 0.164000] shift exponent 64 is too large for 64-bit type 'long
unsigned int'

\
 
 \ /
  Last update: 2016-05-18 17:41    [W:0.767 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site