]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msgr: fix possible use-after-free by taking pipe lock during reap
authorSage Weil <sage@newdream.net>
Wed, 18 Nov 2009 00:30:36 +0000 (16:30 -0800)
committerSage Weil <sage@newdream.net>
Wed, 18 Nov 2009 00:30:36 +0000 (16:30 -0800)
commit6e88d2768501d99d60986f7fe1e74905e22e1087
tree8b2f90e8ac63db4b730735d4b1f8fa2a3e7089a6
parent302fc82f3238c987b6877f646ccdde0d628b5c96
msgr: fix possible use-after-free by taking pipe lock during reap

This ensures that whoever called stop() (mark_down, in particular) finished
with the pipe (unlocked it) before we go and free it.  Otherwise we might
call p->lock.Unlock() after the reaper deleted the Pipe, mucking up some
other memory.

I don't think this was actually triggerd, tho, since we would have seen
the assert(nlock == 0) in ~Mutex???
src/msg/SimpleMessenger.cc