[Spice-devel] [vdagent-win v1] vdagent-win: start vdagent with lock info from session

Victor Toso victortoso at redhat.com
Tue Dec 13 15:16:57 UTC 2016


On Tue, Dec 13, 2016 at 04:15:25PM +0100, Victor Toso wrote:
> Hi,
> 
> On Mon, Dec 12, 2016 at 10:46:34PM +0100, Victor Toso wrote:
> > and maybe move the variable definition to the top?
> >
> > Acked-by: Victor Toso <victortoso at redhat.com>
> >
> >   toso
> 
> I'm removing the ack from this patch. Sorry for the noise.
> 
> The issue is around the whole solution in verifying reliably the
> lock/unlock status of the session. There is race in vdagent.exe in
> regard of receiving the sessions notifications, trying to summarize it
> bellow:
> 
> Normal workflow:
> 1) User clicks to Lock the session
> 2) vdagent receives: WTS_SESSION_LOCK and updates its _session_is_locked
> 3) vdagent receives: CONTROL_ACTION -> CONTROL_DESKTOP_SWITCH which will
>    set its _desktop_switch to true, making the
>    input_desktop_message_loop() to end, which will end up calling
>    WTSUnRegisterSessionNotification() in the process;
> 
> Race workflow:
> (3) happens before (2). That means, WTS_SESSION_LOCK will be ignored and
> its _session_is_locked will not be updated.
> 
> Session will be locked but vdagent will still accept file-transfers :(
> 
> The solution for the moment is removing the handler in vdagent for
> WTS_SESSION_LOCK and WTS_SESSION_UNLOCK, and receive this information
> from vdservice, always. This will be v2 of my previous patch [0] plus
> removing some code in vdagent.

[0] https://lists.freedesktop.org/archives/spice-devel/2016-August/031296.html

> 
> I hope to do it now, do some testing and send it soon.
> 
> Cheers,
>   toso
> 
> PS: A real solution is improving the design of windows vdagent to be
> more like linux vdagent, IMHO :)



> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161213/7d8089ab/attachment.sig>


More information about the Spice-devel mailing list