1. 06 4月, 2013 8 次提交
  2. 05 4月, 2013 19 次提交
  3. 04 4月, 2013 8 次提交
  4. 03 4月, 2013 4 次提交
  5. 02 4月, 2013 1 次提交
    • S
      chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors · 9b938c72
      Stefan Hajnoczi 提交于
      When we receive a file descriptor over a UNIX domain socket the
      O_NONBLOCK flag is preserved.  Clear the O_NONBLOCK flag and rely on
      QEMU file descriptor users like migration, SPICE, VNC, block layer, and
      others to set non-blocking only when necessary.
      
      This change ensures we don't accidentally expose O_NONBLOCK in the QMP
      API.  QMP clients should not need to get the non-blocking state
      "correct".
      
      A recent real-world example was when libvirt passed a non-blocking TCP
      socket for migration where we expected a blocking socket.  The source
      QEMU produced a corrupted migration stream since its code did not cope
      with non-blocking sockets.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      9b938c72