Skip to content
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

fix #5426 race in librbd #1000

Merged
merged 1 commit into from Dec 27, 2013
Merged

fix #5426 race in librbd #1000

merged 1 commit into from Dec 27, 2013

Conversation

jdurgin
Copy link
Member

@jdurgin jdurgin commented Dec 27, 2013

No description provided.

The perfcounters (and the ictx) are only valid while the image is
still open.  If the librbd user gets the callback for its last I/O,
then closes the image, the ictx and its perfcounters will be
invalid. If the AioCompletion object is has not run the rest of its
complete() method yet, it will access these now-invalid addresses,
possibly leading to a crash.

The AioCompletion object is independent of the ictx and does not
access it again after incrementing perfcounters, so avoid this race by
calling the user's callback after this step. The AioCompletion object
will be cleaned up by the rest of complete_request(), independent of
the ImageCtx.

Fixes: #5426
Backport: dumpling, emperor
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
@liewegas
Copy link
Member

aie.. so simple in retrospect!

@liewegas
Copy link
Member

reviewed-by

jdurgin added a commit that referenced this pull request Dec 27, 2013
fix #5426 race in librbd

Reviewed-by: Sage Weil <sage@inktank.com>
@jdurgin jdurgin merged commit 8f3ad4e into master Dec 27, 2013
@jdurgin jdurgin deleted the wip-rbd-tinc-5426 branch December 27, 2013 20:46
liewegas pushed a commit to liewegas/ceph that referenced this pull request Nov 18, 2016
make-rpm.sh: support openSUSE

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants