All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tipp Moseley <tipp.moseley@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Potential timer bug
Date: Fri, 11 Feb 2005 03:38:01 -0700	[thread overview]
Message-ID: <25349aa40502110238484767bb@mail.gmail.com> (raw)
In-Reply-To: <25349aa4050211010930333ae3@mail.gmail.com>

Err.  I'm stupid.  This isn't a bug.




On Fri, 11 Feb 2005 02:09:10 -0700, Tipp Moseley <tipp.moseley@gmail.com> wrote:
> Hello,
> 
> I am running on a uniprocessor x86 with CONFIG_SMP disabled and
> CONFIG_PREEMPT enabled.
> 
> The problem I have encountered is when using a timer in a module.  The
> timer is set to execute every 3 ticks, and does nothing but increment
> a counter, and that works fine.  However, when the module is unloaded
> sometimes the system hangs on module exit and barfs something like:
> 
> Unable to handle kernel paging request at virtual address e18861bc
>  printing eip:
> c0122a88
> *pde = 015e5067
> *pte = 00000000
> Oops: 0002 [#1]
> PREEMPT
> Modules linked in: yenta socket, rsrc_nonstatic sonypi
> CPU: 0
> ...
> Call Trace:
>  __do_softirq+0x76/0x90
>  do_softirq+0x41/0x50
> ...
> <0>Kernel panic - not syncing: Fatal exception in interrupt
> 
> I am using del_timer_sync to delete the timer in the module_exit
> routine, and sometimes it works correctly.  My theory is that since
> with CONFIG_SMP disabled, del_timer_sync is the same as del_timer.
> This allows the timer to potentially execute after the module has
> unloaded, causing the invalid paging request.
> 
> My solution to the problem (which works, but is probably not optimal)
> is to change '#ifdef CONFIG_SMP' to '#if defined(CONFIG_SMP) ||
> defined(CONFIG_PREEMPT)' around the code defining timer_del_sync.  A
> patch is attached.  Let me know if there's any more information that I
> can provide.
> 
> Thanks,
> 
> Tipp Moseley
> 
> 
>

      reply	other threads:[~2005-02-11 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11  9:09 Potential timer bug Tipp Moseley
2005-02-11 10:38 ` Tipp Moseley [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=25349aa40502110238484767bb@mail.gmail.com \
    --to=tipp.moseley@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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.