lkml.org 
[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] nodemask: Consider MAX_NUMNODES inside node_isset
From
Date
On 01/03/2017 02:14 PM, Michal Hocko wrote:
> On Tue 03-01-17 13:57:53, Anshuman Khandual wrote:
>> node_isset can give incorrect result if the node number is beyond the
>> bitmask size (MAX_NUMNODES in this case) which is not checked inside
>> test_bit. Hence check for the bit limits (MAX_NUMNODES) inside the
>> node_isset function before calling test_bit.
> Could you be more specific when such a thing might happen? Have you seen
> any in-kernel user who would give such a bogus node?

Have not seen this through any in-kernel use case. While rebasing the CDM
zonelist rebuilding series, I came across this through an error path when
a bogus node value of 256 (MAX_NUMNODES on POWER) is received when we call
first_node() on an empty nodemask (which itself seems weird as well).

\
 
 \ /
  Last update: 2017-01-03 10:07    [W:0.050 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site