Skip to content

Commit

Permalink
kcm: Remove unnecessary SLAB_PANIC for kmem_cache_create() in kcm_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YueHaibing authored and David S. Miller committed Feb 23, 2019
1 parent 923b55c commit c211524
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/kcm/kcmsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -2036,13 +2036,13 @@ static int __init kcm_init(void)

kcm_muxp = kmem_cache_create("kcm_mux_cache",
sizeof(struct kcm_mux), 0,
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
SLAB_HWCACHE_ALIGN, NULL);
if (!kcm_muxp)
goto fail;

kcm_psockp = kmem_cache_create("kcm_psock_cache",
sizeof(struct kcm_psock), 0,
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
SLAB_HWCACHE_ALIGN, NULL);
if (!kcm_psockp)
goto fail;

Expand Down

0 comments on commit c211524

Please sign in to comment.