|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.4-testing] Fix gdbserver-xen support on older ker
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269952592 -3600
# Node ID 17cb4b7a78e900000dc4ae4558392550d6963409
# Parent b0aef7160eebaea9686cffd49d10823a345f0242
Fix gdbserver-xen support on older kernels.
The xc_ptrace API relies on errno for passing success/failure
indication back to callers. However, mapping operations that fall
back on legacy APIs may leave errno set to a non-zero result even
thought the operation is successful. This patch resets errno after
successful map operations so that xc_ptrace doesn't inadvertently
return a failure.
Signed-off-by: Justin Gibbs <gibbs@xxxxxxxxxxx>
xen-unstable changeset: 21063:0a91254533dc
xen-unstable date: Thu Mar 25 07:41:55 2010 +0000
---
tools/libxc/xc_ptrace.c | 7 +++++++
1 files changed, 7 insertions(+)
diff -r b0aef7160eeb -r 17cb4b7a78e9 tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c Tue Mar 30 13:36:04 2010 +0100
+++ b/tools/libxc/xc_ptrace.c Tue Mar 30 13:36:32 2010 +0100
@@ -174,6 +174,13 @@ map_domain_va(
if (map == NULL)
return NULL;
+ /*
+ * Due to the use of API fallback code in libxc, errno may
+ * be clobberred during successful operations. Since the caller
+ * of xc_ptrace is depending on errno for return status, clear
+ * errno here.
+ */
+ errno = 0;
return map + (va & ~PAGE_MASK);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.4-testing] Fix gdbserver-xen support on older kernels.,
Xen patchbot-3.4-testing <=
|
|
|
|
|