lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 07/15] locking/lockdep: Free lock classes that are no longer in use
From
Date
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.

\
 
 \ /
  Last update: 2019-02-13 01:42    [W:0.130 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site