Re: [PATCH v3 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 30, 2015 at 06:34:30PM +0200, Vlastimil Babka wrote:
> Perform the same debug checks in alloc_pages_node() as are done in
> __alloc_pages_node(), by making the former function a wrapper of the latter
> one.
> 
> In addition to better diagnostics in DEBUG_VM builds for situations which
> have been already fatal (e.g. out-of-bounds node id), there are two visible
> changes for potential existing buggy callers of alloc_pages_node():
> 
> - calling alloc_pages_node() with any negative nid (e.g. due to arithmetic
>   overflow) was treated as passing NUMA_NO_NODE and fallback to local node was
>   applied. This will now be fatal.
> - calling alloc_pages_node() with an offline node will now be checked for
>   DEBUG_VM builds. Since it's not fatal if the node has been previously online,
>   and this patch may expose some existing buggy callers, change the VM_BUG_ON
>   in __alloc_pages_node() to VM_WARN_ON.
> 
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> Acked-by: David Rientjes <rientjes@xxxxxxxxxx>

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]