The quilt patch titled Subject: mm/vmalloc: fix return value of vb_alloc if size is 0 has been removed from the -mm tree. Its filename was mm-vmalloc-fix-return-value-of-vb_alloc-if-size-is-0.patch This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Hailong.Liu" <hailong.liu@xxxxxxxx> Subject: mm/vmalloc: fix return value of vb_alloc if size is 0 Date: Fri, 26 Apr 2024 10:41:49 +0800 vm_map_ram() uses IS_ERR() to validate the return value of vb_alloc(). If vm_map_ram(page, 0, 0) is executed, vb_alloc(0, GFP_KERNEL) would return NULL. In such a case, IS_ERR() cannot handle the return value and lead to kernel panic by vmap_pages_range_noflush() at last. To resolve this issue, return ERR_PTR(-EINVAL) if the size is 0. Link: https://lkml.kernel.org/r/20240426024149.21176-1-hailong.liu@xxxxxxxx Reviewed-by: Barry Song <baohua@xxxxxxxxxx> Reviewed-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx> Signed-off-by: Hailong.Liu <hailong.liu@xxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Cc: Lorenzo Stoakes <lstoakes@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmalloc-fix-return-value-of-vb_alloc-if-size-is-0 +++ a/mm/vmalloc.c @@ -2710,7 +2710,7 @@ static void *vb_alloc(unsigned long size * get_order(0) returns funny result. Just warn and terminate * early. */ - return NULL; + return ERR_PTR(-EINVAL); } order = get_order(size); _ Patches currently in -mm which might be from hailong.liu@xxxxxxxx are