git: 7e77089dccd7 - main - linuxkpi: remove invalid KASSERT from hash_add_rcu
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jan 2024 16:41:34 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7e77089dccd702eb767350a8bd3d20102c4fb591 commit 7e77089dccd702eb767350a8bd3d20102c4fb591 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-01-29 14:25:40 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-01-29 16:40:17 +0000 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 --- sys/compat/linuxkpi/common/include/linux/hashtable.h | 2 -- 1 file changed, 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)