New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journal: don't hold future lock during assignment #13033

Merged
merged 1 commit into from Jan 22, 2017

Conversation

Projects
None yet
2 participants
@dillaman
Contributor

dillaman commented Jan 20, 2017

It's possible that the future raced with its owner and reaches
an empty reference count. This was resulting in the future being
destructed while its lock was still held.

Fixes: http://tracker.ceph.com/issues/18618
Signed-off-by: Jason Dillaman dillaman@redhat.com

@trociny trociny self-assigned this Jan 21, 2017

Mutex::Locker locker(prev_future->m_lock);
future = std::move(prev_future->prepare_flush(&flush_handlers));
}
prev_future = std::move(future);

This comment has been minimized.

@trociny

trociny Jan 21, 2017

Contributor

LGTM. Though wouldn't it be a little more readable if we provide both prepare_flush "locked" and "unlocked" methods and just use "unlocked" one here?

journal: don't hold future lock during assignment
It's possible that the future raced with its owner and reaches
an empty reference count. This was resulting in the future being
destructed while its lock was still held.

Fixes: http://tracker.ceph.com/issues/18618
Signed-off-by: Jason Dillaman <dillaman@redhat.com>

@trociny trociny merged commit fce69f6 into ceph:master Jan 22, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@dillaman dillaman deleted the dillaman:wip-18618 branch Jan 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment