From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix abusive use of xce_handle as FD
Date: Tue, 26 Feb 2008 13:11:02 +0000 [thread overview]
Message-ID: <20080226131102.GA10008@implementation.uk.xensource.com> (raw)
xce handles are not supposed to be used as file descriptors, but
xc_evtchn_fd() be used.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r 00588ab75f22 tools/ioemu/hw/xen_console.c
--- a/tools/ioemu/hw/xen_console.c Tue Feb 26 13:07:06 2008 +0000
+++ b/tools/ioemu/hw/xen_console.c Tue Feb 26 13:07:09 2008 +0000
@@ -381,7 +381,7 @@ static void xencons_startup(void *opaque
qemu_set_fd_handler2(xs_fileno(dom->xsh), NULL, NULL, NULL, NULL);
fprintf(stderr, "Console: connected to guest frontend\n");
- if (qemu_set_fd_handler2(dom->xce_handle, NULL, xencons_ring_read, NULL, dom) < 0)
+ if (qemu_set_fd_handler2(xc_evtchn_fd(dom->xce_handle), NULL, xencons_ring_read, NULL, dom) < 0)
return;
qemu_chr_add_handlers(dom->chr, xencons_can_receive, xencons_receive,
diff -r 00588ab75f22 tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c Tue Feb 26 13:07:06 2008 +0000
+++ b/tools/ioemu/hw/xenfb.c Tue Feb 26 13:07:09 2008 +0000
@@ -1166,7 +1166,7 @@ static int xenfb_register_console(struct
xenfb);
dpy_resize(xenfb->ds, xenfb->width, xenfb->height);
- if (qemu_set_fd_handler2(xenfb->evt_xch, NULL, xenfb_dispatch_channel, NULL, xenfb) < 0)
+ if (qemu_set_fd_handler2(xc_evtchn_fd(xenfb->evt_xch), NULL, xenfb_dispatch_channel, NULL, xenfb) < 0)
return -1;
if (qemu_set_fd_handler2(xs_fileno(xenfb->xsh), NULL, xenfb_dispatch_store, NULL, xenfb) < 0)
return -1;
reply other threads:[~2008-02-26 13:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080226131102.GA10008@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.