VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Miaohe Lin <linmiaohe@huawei.com> 2021-10-18 15:15:59 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-10-18 20:22:03 -1000 commit: 9037c57681d25e4dcc442d940d6dbe24dd31f461 parent: 899447f669da76cc3605665e1a95ee877bc464cc
Commit Summary:
mm, slub: fix potential memoryleak in kmem_cache_open()
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/mm/slub.c b/mm/slub.c
index a56a6423d4e8..bf1793fb4ce5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4210,8 +4210,8 @@ static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags)
 	if (alloc_kmem_cache_cpus(s))
 		return 0;
 
-	free_kmem_cache_nodes(s);
 error:
+	__kmem_cache_release(s);
 	return -EINVAL;
 }