public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Avi Kivity <avi@redhat.com>
Subject: Re: [GIT PULL] Little bugfix to prevent recursion with tracing timestamps
Date: Mon, 12 Sep 2011 16:37:16 -0700	[thread overview]
Message-ID: <4E6E97AC.8020707@goop.org> (raw)
In-Reply-To: <4E6E92AB.5050504@goop.org>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

[ Sigh, for some reason that doesn't verify.  Let's see if this works.
  Anyway, I pushed a signed tag "upstream-bugfix-for-linus" on that
changeset. - J ]

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/

iQEkBAEBCAAGBQJObpesAAoJEAUkni6MUg7HMnAIP0bR68/akTif/RVfis0Cot/a
ONlz5GsGGA7AlHfp/l/M8GZo5fUIC7Ja+EqTnpUWMNbubLoe5kALt5k/uQwADtoI
cyvi5j2tlXDGDZOgQ900pQQYMBFVwaCm5XwSuDTbysPUx4v7E5Ha/RL2xapbuFnP
txCyO62xx4EsKqkupM4qnTCBId6ksRNo9EVESxFzpJk/l0fabTLM98RigA1KJmdo
+Rr+1SzfNnNQLLXG48EHITthfYaBOw9jyGanbe5i9Iw79J85vjI5V65TMlDztWaN
kyUGiWD9f1i9ixCO31qhszdRire8c2N8hDTTN5z1919Gtlkq93Oj3F8zkUlbapyh
tD4e8GObdA==
=MA3l
-----END PGP SIGNATURE-----


      reply	other threads:[~2011-09-12 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12 23:15 [GIT PULL] Little bugfix to prevent recursion with tracing timestamps Jeremy Fitzhardinge
2011-09-12 23:37 ` Jeremy Fitzhardinge [this message]

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=4E6E97AC.8020707@goop.org \
    --to=jeremy@goop.org \
    --cc=avi@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox