--- x/kernel/rcu/tree.c +++ y/kernel/rcu/tree.c @@ -2957,7 +2957,8 @@ krc_this_cpu_lock(unsigned long *flags) local_irq_save(*flags); // For safely calling this_cpu_ptr(). krcp = this_cpu_ptr(&krc); - raw_spin_lock(&krcp->lock); + while (!raw_spin_trylock(&krcp->lock)) + ; return krcp; } --- x/kernel/bpf/lpm_trie.c +++ y/kernel/bpf/lpm_trie.c @@ -382,9 +382,10 @@ static long trie_update_elem(struct bpf_ trie->n_entries--; rcu_assign_pointer(*slot, new_node); - kfree_rcu(node, rcu); - goto out; + spin_unlock_irqrestore(&trie->lock, irq_flags); + kfree_rcu(node, rcu); + return 0; } /* If the new node matches the prefix completely, it must be inserted