]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/DispatchQueue: prevent queueing of new messages after shutdown 20374/head
authorSage Weil <sage@redhat.com>
Thu, 8 Feb 2018 18:48:38 +0000 (12:48 -0600)
committerSage Weil <sage@redhat.com>
Mon, 12 Feb 2018 20:21:01 +0000 (14:21 -0600)
The other queue_* methods check stop; enqueue() did not.

Fixes: http://tracker.ceph.com/issues/18351
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/DispatchQueue.cc

index 263e81f85b483e6d03119fdc360a565e0e8baf62..29c5429b0e0f8fb72842898f5d0d1cc3b90c5398 100644 (file)
@@ -81,6 +81,10 @@ void DispatchQueue::enqueue(Message *m, int priority, uint64_t id)
 {
 
   Mutex::Locker l(lock);
+  if (stop) {
+    m->put();
+    return;
+  }
   ldout(cct,20) << "queue " << m << " prio " << priority << dendl;
   add_arrival(m);
   if (priority >= CEPH_MSG_PRIO_LOW) {