The patch titled Subject: lib/test_meminit.c: use GFP_ATOMIC in RCU critical section has been added to the -mm tree. Its filename is test_meminit-use-gfp_atomic-in-rcu-critical-section.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/test_meminit-use-gfp_atomic-in-rcu-critical-section.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/test_meminit-use-gfp_atomic-in-rcu-critical-section.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alexander Potapenko <glider@xxxxxxxxxx> Subject: lib/test_meminit.c: use GFP_ATOMIC in RCU critical section kmalloc() shouldn't sleep while in RCU critical section, therefore use GFP_ATOMIC instead of GFP_KERNEL. The bug was spotted by the 0day kernel testing robot. Link: http://lkml.kernel.org/r/20190725121703.210874-1-glider@xxxxxxxxxx Fixes: 7e659650cbda ("lib: introduce test_meminit module") Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Reported-by: kernel test robot <lkp@xxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/test_meminit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/test_meminit.c~test_meminit-use-gfp_atomic-in-rcu-critical-section +++ a/lib/test_meminit.c @@ -222,7 +222,7 @@ static int __init do_kmem_cache_size(siz * Copy the buffer to check that it's not wiped on * free(). */ - buf_copy = kmalloc(size, GFP_KERNEL); + buf_copy = kmalloc(size, GFP_ATOMIC); if (buf_copy) memcpy(buf_copy, buf, size); _ Patches currently in -mm which might be from glider@xxxxxxxxxx are test_meminit-use-gfp_atomic-in-rcu-critical-section.patch