Re: [Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-10 Thread Luiz Capitulino
On Tue, 10 Apr 2012 16:27:45 -0300 Luiz Capitulino wrote: > On Tue, 10 Apr 2012 13:50:28 -0500 > Michael Roth wrote: > > > On Tue, Apr 10, 2012 at 01:45:15PM -0300, Luiz Capitulino wrote: > > > On Mon, 9 Apr 2012 17:29:51 -0500 > > > Michael Roth wrote: > > > > > > > On Mon, Apr 09, 2012 at 0

Re: [Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-10 Thread Luiz Capitulino
On Tue, 10 Apr 2012 13:50:28 -0500 Michael Roth wrote: > On Tue, Apr 10, 2012 at 01:45:15PM -0300, Luiz Capitulino wrote: > > On Mon, 9 Apr 2012 17:29:51 -0500 > > Michael Roth wrote: > > > > > On Mon, Apr 09, 2012 at 04:57:48PM -0300, Luiz Capitulino wrote: > > > > Hi Michael, > > > > > > > >

Re: [Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-10 Thread Michael Roth
On Tue, Apr 10, 2012 at 01:45:15PM -0300, Luiz Capitulino wrote: > On Mon, 9 Apr 2012 17:29:51 -0500 > Michael Roth wrote: > > > On Mon, Apr 09, 2012 at 04:57:48PM -0300, Luiz Capitulino wrote: > > > Hi Michael, > > > > > > There's a possible race condition in the bios_supports_mode() function

Re: [Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-10 Thread Luiz Capitulino
On Mon, 9 Apr 2012 17:29:51 -0500 Michael Roth wrote: > On Mon, Apr 09, 2012 at 04:57:48PM -0300, Luiz Capitulino wrote: > > Hi Michael, > > > > There's a possible race condition in the bios_supports_mode() function used > > by all suspend commands in qemu-ga: if the parent process receives a SI

Re: [Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-09 Thread Michael Roth
On Mon, Apr 09, 2012 at 04:57:48PM -0300, Luiz Capitulino wrote: > Hi Michael, > > There's a possible race condition in the bios_supports_mode() function used > by all suspend commands in qemu-ga: if the parent process receives a SIGCHLD > while executing: > > close(pipefds[1]); > g_free(

[Qemu-devel] qemu-ga: possible race while suspending the guest

2012-04-09 Thread Luiz Capitulino
Hi Michael, There's a possible race condition in the bios_supports_mode() function used by all suspend commands in qemu-ga: if the parent process receives a SIGCHLD while executing: close(pipefds[1]); g_free(pmutils_path); Or: ret = read(pipefds[0], &status, sizeof(status)); Then b