Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lockdep: fix races with concurrent lockdep teardown
If the cct is unregistered while other threads are flogging mutexes, then we can hit all sorts of bugs. Ensure that we handle that situation sanely, by checking that g_lockdep is still set after we take the lockdep_mutex. Also, remove an assertion from lockdep_unregister, and just turn it into an immediate return. It's possible to have a call to lockdep_unregister_ceph_context, and then a call to lockdep_register_ceph_context while a mutex is being held by another task. In that case, it's possible the lock does not exist in the map when we go to unregister it. That's not a bug though, just a natural consequence of that series of actions. Tracker: http://tracker.ceph.com/issues/20988 Signed-off-by: Jeff Layton <jlayton@redhat.com>
- Loading branch information
Showing
1 changed file
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters