vd_agent_char_device_wakeup is called from separate thread, causing potential races
@alon
Submitted by Alon Levy Assigned to Spice Bug List
Description
guest paste: per cpu thread: kvm_main_loop_cpu..vmc_have_data..spice_server_vdi_port_wakeup ..read_from_vdi_port
client message (mouse / clipboard) qemu/kvm main thread: main_loop..inputs_event..reds_handle_agent_mouse_event..write_to_vdi_port
We need to either be very sure there is no touching of the same data structures, or relay the data over to one thread (the main thread).
Both spice-vmc write and virtio-serial write functions are not thread safe.