lkml.org 
[lkml]   [2022]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] locking/lockdep: Avoid potential access of invalid memory in lock_class
From
On 1/2/22 18:35, Waiman Long wrote:
> - WARN_ON_ONCE(!found);
> - __lockdep_free_key_range(pf, key, 1);
> - call_rcu_zapped(pf);
> - graph_unlock();
> -out_irq:
> + WARN_ON_ONCE(!found && debug_locks);

lockdep_unregister_key() should only be called for a registered key so I'd
like to keep the WARN_ON_ONCE(!found) here instead of changing it into
WARN_ON_ONCE(!found && debug_locks). Otherwise this patch looks good to me.

Thanks,

Bart.

\
 
 \ /
  Last update: 2022-01-03 18:49    [W:0.058 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site