mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 19:03:48 +01:00
linuxkpi: remove invalid KASSERT from hash_add_rcu
hash_add_rcu asserted that the node's prev pointer was NULL in an attempt to detect addition of a node already on a list, but the caller is not required to provide a zeroed node. Reported in https://github.com/freebsd/drm-kmod/issues/282 Reviewed by: bz, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43645
This commit is contained in:
parent
5086b6ec32
commit
7e77089dcc
@ -92,8 +92,6 @@ __hash_node_type_assert(struct hlist_node *node)
|
|||||||
#define hash_add_rcu(ht, node, key) do { \
|
#define hash_add_rcu(ht, node, key) do { \
|
||||||
struct lkpi_hash_head *__head = &(ht)[hash_min(key, HASH_BITS(ht))]; \
|
struct lkpi_hash_head *__head = &(ht)[hash_min(key, HASH_BITS(ht))]; \
|
||||||
__hash_node_type_assert(node); \
|
__hash_node_type_assert(node); \
|
||||||
KASSERT(((struct lkpi_hash_entry *)(node))->entry.cle_prev == NULL, \
|
|
||||||
("node is already on list or was not zeroed")); \
|
|
||||||
CK_LIST_INSERT_HEAD(&__head->head, \
|
CK_LIST_INSERT_HEAD(&__head->head, \
|
||||||
(struct lkpi_hash_entry *)(node), entry); \
|
(struct lkpi_hash_entry *)(node), entry); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user