diff options
author | Sage Weil <sage@inktank.com> | 2012-08-24 20:16:01 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-08-24 22:38:05 +0200 |
commit | bcd4b09ba93c57d3e696cfd8101538ea217d4aa2 (patch) | |
tree | ae7a4e81072bf289af4ff9df8570878fd4ff2bde | |
parent | ceph.spec.in: package new rados library. (diff) | |
download | ceph-bcd4b09ba93c57d3e696cfd8101538ea217d4aa2.tar.xz ceph-bcd4b09ba93c57d3e696cfd8101538ea217d4aa2.zip |
osd: fix use-after-free in handle_notify_timeout
Valgrind turned this up.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/osd/OSD.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e2e45351850..4c27d18fa87 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2267,10 +2267,12 @@ void OSD::handle_notify_timeout(void *_notif) ReplicatedPG::ObjectContext *obc = (ReplicatedPG::ObjectContext *)notif->obc; + pg_t pgid = notif->pgid; + complete_notify(_notif, obc); service.watch_lock.Unlock(); /* drop lock to change locking order */ - put_object_context(obc, notif->pgid); + put_object_context(obc, pgid); service.watch_lock.Lock(); /* exiting with watch_lock held */ } |