WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [GIT PULL] Little bugfix to prevent recursion with tracing t

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [GIT PULL] Little bugfix to prevent recursion with tracing timestamps
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 12 Sep 2011 16:15:55 -0700
Cc: Avi Kivity <avi@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Mon, 12 Sep 2011 16:16:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Linus,

When starting a PV kernel under Xen with full boot-time trace testing
enabled, it crashes due to infinite recursion.  In principle it could
happen at other times too (when just using preempt tracing perhaps?). 
This fixes it.

BTW, I think this same problem also affects KVM.

Erm, I'm not sure how to authenticate this github as being really from
me; I'm signing the mail with my long-standing pgp key in the hope that
it helps...  Also, the patch is self-evident.

Thanks,
    J

The following changes since commit b6fd41e29dea9c6753b1843a77e50433e6123bcb:

  Linux 3.1-rc6 (2011-09-12 14:02:02 -0700)

are available in the git repository at:
  git://github.com/jsgf/linux-xen.git upstream/bugfix

Jeremy Fitzhardinge (1):
      xen: use non-tracing preempt in xen_clocksource_read()

 arch/x86/xen/time.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 5158c50..163b467 100644
- --- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -168,9 +168,10 @@ cycle_t xen_clocksource_read(void)
         struct pvclock_vcpu_time_info *src;
     cycle_t ret;
 
- -    src = &get_cpu_var(xen_vcpu)->time;
+    preempt_disable_notrace();
+    src = &__get_cpu_var(xen_vcpu)->time;
     ret = pvclock_clocksource_read(src);
- -    put_cpu_var(xen_vcpu);
+    preempt_enable_notrace();
     return ret;
 }
 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEkBAEBCAAGBQJObpKlAAoJEAUkni6MUg7HKoYIPjZxR2owmacxLomFAY+3wc0d
qgRorBOqTrfs5gF/JmW/I77UnJyqPymhPHn9Mbd5fuxjTLLVmS8UfZvRcz6Rjejy
oePhizOqWfEtB8wg1BsOtQ+YxsWIPwphkotedfOwcYczq8CwRKO09EuqA/YsxOcr
C20XES5weBck+5KDWNBkprzuPUzo3zZbqFlBEWSTYk9mbQ2ZcEPDxKEUJqzcuQ81
2ue3iCv5XU8jupWrf8W+os1Js1ivgsq4ntH7F7hOv4KShtj7AB9xL5/6oUEwKG59
wTFyZ5Smz3DFfe3tTDBUb06qy/aTj1Lqig/KcR966EhHkjNnloMwn/FGowwkQzT8
JJcReYgXAQ==
=5H3T
-----END PGP SIGNATURE-----


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>