Skip to content

Commit c211524

Browse files
YueHaibingdavem330
authored andcommitted
kcm: Remove unnecessary SLAB_PANIC for kmem_cache_create() in kcm_init
There has check NULL on kmem_cache_create on failure in kcm_init, no need use SLAB_PANIC to panic the system. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 923b55c commit c211524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/kcm/kcmsock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,13 +2036,13 @@ static int __init kcm_init(void)
20362036

20372037
kcm_muxp = kmem_cache_create("kcm_mux_cache",
20382038
sizeof(struct kcm_mux), 0,
2039-
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
2039+
SLAB_HWCACHE_ALIGN, NULL);
20402040
if (!kcm_muxp)
20412041
goto fail;
20422042

20432043
kcm_psockp = kmem_cache_create("kcm_psock_cache",
20442044
sizeof(struct kcm_psock), 0,
2045-
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
2045+
SLAB_HWCACHE_ALIGN, NULL);
20462046
if (!kcm_psockp)
20472047
goto fail;
20482048

0 commit comments

Comments
 (0)