]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kcm: Remove unnecessary SLAB_PANIC for kmem_cache_create() in kcm_init
authorYueHaibing <yuehaibing@huawei.com>
Fri, 22 Feb 2019 06:15:30 +0000 (14:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Feb 2019 21:46:24 +0000 (13:46 -0800)
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>
net/kcm/kcmsock.c

index 571d824e4e2499e1f591701ed0e25c4aff73b00a..c5c5ab6c5a1ccdf55eb7891e8c21ea3cdf7d2a28 100644 (file)
@@ -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;