aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorPrzemek Kitszel <[email protected]>2025-03-20 10:22:19 +0000
committerAndrew Morton <[email protected]>2025-05-12 00:48:19 +0000
commit4c97a17a252bf8396f7bd65efced00bf401a8c25 (patch)
treebfdfe7beb540ce8a243ac2e3d7d5a61f924c1f27 /mm/vmalloc.c
parentarm64/mm: define ptdesc_t (diff)
downloadkernel-4c97a17a252bf8396f7bd65efced00bf401a8c25.tar.gz
kernel-4c97a17a252bf8396f7bd65efced00bf401a8c25.zip
xarray: make xa_alloc_cyclic() return 0 on all success cases
Change xa_alloc_cyclic() to return 0 even on wrap-around. Do the same for xa_alloc_cyclic_irq() and xa_alloc_cyclic_bh(). This will prevent any future bug of treating return of 1 as an error: int ret = xa_alloc_cyclic(...) if (ret) // currently mishandles ret==1 goto failure; If there will be someone interested in when wrap-around occurs, there is still __xa_alloc_cyclic() that behaves as before. For now there is no such user. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Przemek Kitszel <[email protected]> Suggested-by: Matthew Wilcox <[email protected]> Link: https://lore.kernel.org/netdev/[email protected] Cc: Andriy Shevchenko <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Michal Swiatkowski <[email protected]> Cc: Przemek Kitszel <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions