Home
last modified time | relevance | path

Searched refs:hsh_tbl (Results 1 – 2 of 2) sorted by relevance

/linux-6.1.9/net/netlabel/
Dnetlabel_domainhash.c365 struct netlbl_domhsh_tbl *hsh_tbl; in netlbl_domhsh_init() local
370 hsh_tbl = kmalloc(sizeof(*hsh_tbl), GFP_KERNEL); in netlbl_domhsh_init()
371 if (hsh_tbl == NULL) in netlbl_domhsh_init()
373 hsh_tbl->size = 1 << size; in netlbl_domhsh_init()
374 hsh_tbl->tbl = kcalloc(hsh_tbl->size, in netlbl_domhsh_init()
377 if (hsh_tbl->tbl == NULL) { in netlbl_domhsh_init()
378 kfree(hsh_tbl); in netlbl_domhsh_init()
381 for (iter = 0; iter < hsh_tbl->size; iter++) in netlbl_domhsh_init()
382 INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); in netlbl_domhsh_init()
385 rcu_assign_pointer(netlbl_domhsh, hsh_tbl); in netlbl_domhsh_init()
Dnetlabel_unlabeled.c1419 struct netlbl_unlhsh_tbl *hsh_tbl; in netlbl_unlabel_init() local
1424 hsh_tbl = kmalloc(sizeof(*hsh_tbl), GFP_KERNEL); in netlbl_unlabel_init()
1425 if (hsh_tbl == NULL) in netlbl_unlabel_init()
1427 hsh_tbl->size = 1 << size; in netlbl_unlabel_init()
1428 hsh_tbl->tbl = kcalloc(hsh_tbl->size, in netlbl_unlabel_init()
1431 if (hsh_tbl->tbl == NULL) { in netlbl_unlabel_init()
1432 kfree(hsh_tbl); in netlbl_unlabel_init()
1435 for (iter = 0; iter < hsh_tbl->size; iter++) in netlbl_unlabel_init()
1436 INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); in netlbl_unlabel_init()
1439 rcu_assign_pointer(netlbl_unlhsh, hsh_tbl); in netlbl_unlabel_init()