[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-users] xm create of a VMX fails - qemu-dm gets SIGSEGV
Thanks Daniel. :-) The protection mechanism is a little weak. Here is my patch. diff -r 28ce48573771 tools/ioemu/vl.c --- a/tools/ioemu/vl.c Wed Nov 30 19:55:08 2005 +++ b/tools/ioemu/vl.c Thu Dec 1 17:00:21 2005 @@ -1218,17 +1218,22 @@ CharDriverState *qemu_chr_open_pty(void) { int master_fd, slave_fd; + char *slave_name; struct termios term; if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0) return NULL; - /* Set raw attributes on the pty. */ - cfmakeraw(&term); - tcsetattr(slave_fd, TCSAFLUSH, &term); - - fprintf(stderr, "char device redirected to %s\n", ptsname(slave_fd)); - store_console_dev(domid, ptsname(slave_fd)); + slave_name = ptsname(master_fd); + if (slave_name) { + fprintf(stderr, "char device redirected to %s\n", slave_name); + store_console_dev(domid, slave_name); + /* Set raw attributes on the pty. */ + cfmakeraw(&term); + tcsetattr(slave_fd, TCSAFLUSH, &term); + } else { + fprintf(logfile, "failed to redirect char device to pty"); + } return qemu_chr_open_fd(master_fd, master_fd); } >-----Original Message----- >From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx >[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Daniel Stekloff >Sent: Thursday, December 01, 2005 3:57 PM >To: xen-users@xxxxxxxxxxxxxxxxxxx; Steve Dobbelstein >Cc: xen-devel@xxxxxxxxxxxxxxxxxxx >Subject: Re: [Xen-users] xm create of a VMX fails - qemu-dm gets SIGSEGV > >On Wednesday 30 November 2005 16:09, Steve Dobbelstein wrote: >> Greetings, all. >> >> I'm having trouble getting a VMX domain started. I'm running on changeset >> 8119. Shortly after the "xm create" finishes the qemu-dm process goes >> defunct. I wrote a little script so that strace could attach to the >> qemu-dm process right after the "xm create" finishes: > >The problem is ptsname(slave_fd) is returning NULL in the ioemu/vl.c code that >was introduced in changeset 8118:590915af8117. > >I've changed ptsname to ttyname() and it works. Not sure if this is the right >fix. > >Signed-off-by: Daniel Stekloff <dsteklof@xxxxxxxxxx> _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |