]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
xenstore: don't wait with the PCATCH flag
authorroyger <royger@FreeBSD.org>
Thu, 24 May 2018 10:17:03 +0000 (10:17 +0000)
committerroyger <royger@FreeBSD.org>
Thu, 24 May 2018 10:17:03 +0000 (10:17 +0000)
commit998fcd5b20dd4784fa44445cbbb57b18f692ce1c
tree938a93f1b56ccdae53654f60f0730d41baff1a29
parentcb4ecacee9466d6932cd7fcf6bfad62391a34b24
xenstore: don't wait with the PCATCH flag

Due to the current synchronous xenstore implementation in FreeBSD, we
cannot return from xs_read_reply without reading a reply, or else the
ring gets out of sync and the next request will read the previous
reply and crash due to the type mismatch. A proper solution involves
making use of the req_id field in the message and allowing multiple
in-flight messages at the same time on the ring.

Remove the PCATCH flag so that signals don't interrupt the wait.

Tested by:      Nathan Friess <nathan.friess@gmail.com>
Sponsored by:   Citrix Systems R&D
sys/dev/xen/xenstore/xenstore.c