qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <Stefan.Weil@weilnetz.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [Bug] Timer bugs in hw/m48t59.c?
Date: Thu, 22 Mar 2007 21:42:25 +0100	[thread overview]
Message-ID: <4602EA31.1010009@weilnetz.de> (raw)

Hi,

could SPARC or PPC users please check whether the timer code
in hw/m48t59.c is really correct?

I expect a crash in qemu_mod_timer after wd_timer = NULL and
a call to qemu_mod_timer with this NULL value.

The same applies to alrm_timer.

I wrote a quick-and-dirty patch, but think that even more
old code could be removed.

Stefan



diff -u -b -B -r1.8 m48t59.c
--- hw/m48t59.c 14 Jun 2006 12:41:34 -0000      1.8
+++ hw/m48t59.c 22 Mar 2007 20:29:15 -0000
@@ -155,7 +155,6 @@
     NVRAM->alarm = mktime(tm);
     if (NVRAM->alrm_timer != NULL) {
         qemu_del_timer(NVRAM->alrm_timer);
-       NVRAM->alrm_timer = NULL;
     }
     if (NVRAM->alarm - time(NULL) > 0)
        qemu_mod_timer(NVRAM->alrm_timer, NVRAM->alarm * 1000);
@@ -184,7 +183,6 @@

     if (NVRAM->wd_timer != NULL) {
         qemu_del_timer(NVRAM->wd_timer);
-       NVRAM->wd_timer = NULL;
     }
     NVRAM->buffer[0x1FF0] &= ~0x80;
     if (value != 0) {

             reply	other threads:[~2007-03-22 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22 20:42 Stefan Weil [this message]
2007-03-23 20:20 ` [Qemu-devel] [Bug] Timer bugs in hw/m48t59.c? Blue Swirl
2007-09-24 17:24 ` Stefan Weil
2007-09-24 20:25   ` J. Mayer

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=4602EA31.1010009@weilnetz.de \
    --to=stefan.weil@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).