]> sourceware.org Git - systemtap.git/commit
PR23356: stap-serverd: fix private key disposal race condition
authorFrank Ch. Eigler <fche@redhat.com>
Sat, 30 Jun 2018 03:01:33 +0000 (23:01 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 30 Jun 2018 03:01:33 +0000 (23:01 -0400)
commit30321a383be7481c3aa604e44a0bea0cc38ff23d
tree2c448877999c4541fa7c2a72b7aed321cf78dfcf
parent256df01b7fd0fc19ea0eb298e5c393a60d4d14e5
PR23356: stap-serverd: fix private key disposal race condition

Previous code made it possible for an incoming request to be processed
in a handle_connection() thread at the same time as the privkey to it
would be disposed-of in the accept_connections() loop.  (This could
happen if the latter encountered a cert-validation error immediately
after the handle_connection thread started, thus its loop was exited.)

We now pass a SECKEY_CopyPrivateKey(privKey) to the thread, which it
will dispose of itself.  Thus the main thread can do its prior thing.
stap-serverd.cxx
This page took 0.025735 seconds and 5 git commands to generate.