diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2024-01-29 14:25:40 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2024-01-29 16:40:17 +0000 |
| commit | 7e77089dccd702eb767350a8bd3d20102c4fb591 (patch) | |
| tree | 95abb9da52946b8c8ece6349978ed02801cbe095 | |
| parent | 5086b6ec32d5c82c3d0894eb7bd74a9b81480644 (diff) | |
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
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/hashtable.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/hashtable.h b/sys/compat/linuxkpi/common/include/linux/hashtable.h index 5703d6282ad7..55755c354959 100644 --- a/sys/compat/linuxkpi/common/include/linux/hashtable.h +++ b/sys/compat/linuxkpi/common/include/linux/hashtable.h @@ -92,8 +92,6 @@ __hash_node_type_assert(struct hlist_node *node) #define hash_add_rcu(ht, node, key) do { \ struct lkpi_hash_head *__head = &(ht)[hash_min(key, HASH_BITS(ht))]; \ __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, \ (struct lkpi_hash_entry *)(node), entry); \ } while (0) |
