All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xc_ptrace.c fix
@ 2005-07-03  1:07 Kip Macy
  2005-07-03  8:30 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Kip Macy @ 2005-07-03  1:07 UTC (permalink / raw)
  To: xen-devel

Could you please apply the following trivial patch (yes I know, gmail
screws up whitespace). It fixes a crash in the gdbserver that can be
hit when debugging linux.


--- a/tools/libxc/xc_ptrace.c   Fri Jul  1 21:25:45 2005
+++ b/tools/libxc/xc_ptrace.c   Sun Jul  3 01:05:21 2005
@@ -200,7 +200,7 @@
                                             pde_phys[cpu] >>
PAGE_SHIFT)) == NULL)
            goto error_out;
     }
-    if ((page = pde_virt[cpu][vtopti(va)]) == 0) /* logical address */
+    if ((pde_virt[cpu] == NULL) || (page = pde_virt[cpu][vtopti(va)])
== 0) /* logical address */
        goto error_out;
     if (ctxt[cpu].flags & VGCF_VMX_GUEST)
         page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xc_ptrace.c fix
  2005-07-03  1:07 [PATCH] xc_ptrace.c fix Kip Macy
@ 2005-07-03  8:30 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2005-07-03  8:30 UTC (permalink / raw)
  To: Kip Macy; +Cc: xen-devel


On 3 Jul 2005, at 02:07, Kip Macy wrote:

> Could you please apply the following trivial patch (yes I know, gmail
> screws up whitespace). It fixes a crash in the gdbserver that can be
> hit when debugging linux.

But you set pde_virt immediately above the test that you are patching, 
if pde_phys[cpu] != pde.
And if mmap'ing pde_virt fails, you bail with an error. So how can you 
get pde_virt[cpu] == NULL at that point -- aren;t you just hiding the 
real bug?

  -- Keir

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-03  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-03  1:07 [PATCH] xc_ptrace.c fix Kip Macy
2005-07-03  8:30 ` Keir Fraser

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.