Fix callback race in the session save and shutdown code.
Quoting the review request: This patch tries to a fix a race in the session saving and shutdown code of ksmserver. The race may happen on wmPhase1WaitingCount variable when WM-type clients are fast enough to complete their save requests while the loop in KSMServer::shutdown is still iterating. As a result wmPhase1WaitingCount may become zero too early and that would kick off the next save/shutdown phase in a client's callback. In fact, it might even go multiple times from zero to non-zero and back during the WM-specific loop. I was planning on merging the KDE/4.8 branch into KDE/4.9, but there were too many conflicts and I am not very familiar with this module, so I'm cherry-picking this time. Merging KDE/4.9 into master is much easier, though. Patch by Andriy Gapon <avg@FreeBSD.org> REVIEW: 105111 BUG: 206511 FIXED-IN: 4.8.5 CCMAIL: avg@FreeBSD.org (cherry picked from commit b1439fb1)
parent
924a7f43
Please register or sign in to comment