Re: [RFC] nodemask: Consider MAX_NUMNODES inside node_isset

2017-01-03 Thread Anshuman Khandual
On 01/03/2017 02:47 PM, Michal Hocko wrote: > On Tue 03-01-17 14:37:09, Anshuman Khandual wrote: >> 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_NU

Re: [RFC] nodemask: Consider MAX_NUMNODES inside node_isset

2017-01-03 Thread Michal Hocko
On Tue 03-01-17 14:37:09, Anshuman Khandual wrote: > 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 insid

Re: [RFC] nodemask: Consider MAX_NUMNODES inside node_isset

2017-01-03 Thread Anshuman Khandual
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

Re: [RFC] nodemask: Consider MAX_NUMNODES inside node_isset

2017-01-03 Thread Michal Hocko
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

[RFC] nodemask: Consider MAX_NUMNODES inside node_isset

2017-01-03 Thread Anshuman Khandual
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. Signed-off-by: Anshuman Khandual --- include/