From: Vlad Buslov <vla...@mellanox.com>
Date: Mon, 13 Aug 2018 20:20:11 +0300

> Lockdep reports deadlock for following locking scenario in ife action:
> 
> Task one:
> 1) Executes ife action update.
> 2) Takes tcfa_lock.
> 3) Waits on ife_mod_lock which is already taken by task two.
> 
> Task two:
> 
> 1) Executes any path that obtains ife_mod_lock without disabling bh (any
> path that takes ife_mod_lock while holding tcfa_lock has bh disabled) like
> loading a meta module, or creating new action.
> 2) Takes ife_mod_lock.
> 3) Task is preempted by rate estimator timer.
> 4) Timer callback waits on tcfa_lock which is taken by task one.
> 
> In described case tasks deadlock because they take same two locks in
> different order. To prevent potential deadlock reported by lockdep, always
> disable bh when obtaining ife_mod_lock.
> 
> Lockdep warning:
 ...
> Fixes: ef6980b6becb ("introduce IFE action")
> Signed-off-by: Vlad Buslov <vla...@mellanox.com>

Applied and queued up for -stable, thanks.

Reply via email to