Messages in this thread | | | Date | Wed, 23 Nov 2022 20:25:37 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] mm/vmalloc: Add check for KMEM_CACHE |
| |
On Thu, 24 Nov 2022 12:02:26 +0800 Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:
> As KMEM_CACHE may return NULL pointer, it should > be better to check the return value in order to > avoid NULL pointer dereference in kmem_cache_zalloc. > > ... > > @@ -2426,15 +2426,17 @@ void __init vmalloc_init(void)
Linux assumes that allocation attempts from __init code will succeed.
Because if they fail so early in the boot process, the system is so utterly messed up that we may as well just go oops.
| |