On Thu, 2019-01-10 at 16:24 +0100, Peter Zijlstra wrote:
> [ ... ]
> @@ -4579,17 +4559,19 @@ static void lockdep_reset_lock_reg(struc
> */
> static void lockdep_reset_lock_imm(struct lockdep_map *lock)
> {
> - struct pending_free *pf;
> unsigned long flags;
> + LIST_HEAD(zapped);
>
> - pf = get_pending_free_lock_imm(&flags);
> - if (!pf)
> - return;
> - __lockdep_reset_lock(pf, lock);
> - arch_spin_unlock(&lockdep_lock);
> - raw_local_irq_restore(flags);
> + raw_local_irq_save(flags);
> + if (!graph_lock())
> + goto out_irq;
> +
> + __lockdep_reset_lock(&zapped, lock);
> + __free_zapped_classes(&zapped);
>
> - free_zapped_classes(&pf->rcu_head);
> + graph_unlock();
> +out_irq:
> + raw_local_irq_restore(flags);
> }
If graph_lock() is used inside lockdep_free_key_range_imm() and/or
lockdep_reset_lock_imm() instead of arch_spin_lock() then the self-tests fail.
Anyway, I will integrate this patch in my patch series.
Thanks,
Bart.