]>
git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix races on SharedBlob::coll in ~SharedBlob.
Example scenario:
```
A: BlueStore::Collection::split_cache(src, dest)
A: std::lock(src->cache->lock, dest->cache->lock)
B: SharedBlob::~SharedBlob
B: waits coll->cache->lock // coll == src
A: sb->coll := dest
A: unlocks both src and dest's cache mutexes
C: // any locked operation on dest's cache
C: acquires dest->cache->lock
C: begins the op
B: // with the src's cache mutex acquired
B: BufferSpace::_clear(coll->cache) // coll == dest
B: // oops, B operates on cache already locked by C
```
Fixes: http://tracker.ceph.com/issues/24859
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>