Re: [PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-05 Thread Michal Hocko
On Wed 05-06-19 21:25:01, Bharath Vedartham wrote: > IMO the reason why a lot of failures must not have occured in the past > might be because the programs which use it use stuff like cpu_to_node or > have checks for nid. > If one day we do get a program which passes an invalid node id without > VM

Re: [PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-05 Thread Bharath Vedartham
IMO the reason why a lot of failures must not have occured in the past might be because the programs which use it use stuff like cpu_to_node or have checks for nid. If one day we do get a program which passes an invalid node id without VM_BUG_ON enabled, it might get weird.

Re: [PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-05 Thread Michal Hocko
On Wed 05-06-19 18:37:28, Bharath Vedartham wrote: > [Not replying inline as my mail is bouncing back] > > This patch is based on reading the code rather than a kernel crash. My > thought process was that if an invalid node id was passed to > __alloc_pages_node, it would be better to add a VM_WARN

Re: [PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-05 Thread Bharath Vedartham
[Not replying inline as my mail is bouncing back] This patch is based on reading the code rather than a kernel crash. My thought process was that if an invalid node id was passed to __alloc_pages_node, it would be better to add a VM_WARN_ON and fail the allocation rather than crashing the kernel.

Re: [PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-05 Thread Michal Hocko
On Wed 05-06-19 11:32:29, Bharath Vedartham wrote: > In __alloc_pages_node, there is a VM_BUG_ON on the condition (nid < 0 || > nid >= MAX_NUMNODES). Remove this VM_BUG_ON and add a VM_WARN_ON, if the > condition fails and fail the allocation if an invalid NUMA node id is > passed to __alloc_pages_

[PATCH] mm: Remove VM_BUG_ON in __alloc_pages_node

2019-06-04 Thread Bharath Vedartham
In __alloc_pages_node, there is a VM_BUG_ON on the condition (nid < 0 || nid >= MAX_NUMNODES). Remove this VM_BUG_ON and add a VM_WARN_ON, if the condition fails and fail the allocation if an invalid NUMA node id is passed to __alloc_pages_node. The check (nid < 0 || nid >= MAX_NUMNODES) also cons