diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
index e3538b5ff4..f9c1114918 100644
--- a/module/spl/spl-kmem.c
+++ b/module/spl/spl-kmem.c
@@ -404,7 +404,8 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void *
 	spin_lock_irqsave(lock, flags);
 
 	head = &table[hash_ptr(addr, bits)];
-	hlist_for_each_entry_rcu(p, node, head, kd_hlist) {
+	hlist_for_each_rcu(node, head) {
+		p = list_entry_rcu(node, struct kmem_debug, kd_hlist);
 		if (p->kd_addr == addr) {
 			hlist_del_init(&p->kd_hlist);
 			list_del_init(&p->kd_list);
diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c
index d7749cf7b8..6e5605b9d7 100644
--- a/module/spl/spl-tsd.c
+++ b/module/spl/spl-tsd.c
@@ -113,7 +113,8 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid)
 	hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits);
 	bin = &table->ht_bins[hash];
 	spin_lock(&bin->hb_lock);
-	hlist_for_each_entry(entry, node, &bin->hb_head, he_list) {
+	hlist_for_each(node, &bin->hb_head) {
+		entry = list_entry(node, tsd_hash_entry_t, he_list);
 		if ((entry->he_key == key) && (entry->he_pid == pid)) {
 			spin_unlock(&bin->hb_lock);
 			SRETURN(entry);