linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janne Karhunen <janne.karhunen@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 3.12.0-rc5+ reproducible crash at kernel/timer.c:1117
Date: Thu, 17 Oct 2013 15:20:15 +0300	[thread overview]
Message-ID: <CAE=NcrYi2c8XaswXJOGENm7QLgps+OvYMVgz5-OTWud3f3a+Mg@mail.gmail.com> (raw)
In-Reply-To: <CAE=NcrZ=9Tyc24PgiB+Hkk7DNwH3AMB_EqwWPEuzmcLMjTK7ig@mail.gmail.com>

On Tue, Oct 15, 2013 at 10:41 AM, Janne Karhunen
<janne.karhunen@gmail.com> wrote:

>> call_timer_fn 0x73/0x160 <--- EIP hits 0
>
> Use after free.. with CONFIG_DEBUG_PAGEALLOC &&
> CONFIG_DEBUG_OBJECTS_TIMERS we get :
>
> call_timer_fn 0x73/0x160
> destroy_timer_on_stack 0x20/0x20
> ftrace_raw_event_hrtimer_expire_entry 0x3b/0xc0
> run_timer_softirq 0x1f2/0x230

Sadly no time to hunt the free at the moment, so working around temporarily by

diff --git a/kernel/timer.c b/kernel/timer.c
index 4296d13..fc7ef44 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1094,6 +1094,9 @@ static void call_timer_fn(struct timer_list
*timer, void (*fn)(unsigned long),
 {
        int preempt_count = preempt_count();

+       if (fn == NULL)
+               return;
+

Hoping someone wiser catches the real fix at some point.


-- 
Janne

      reply	other threads:[~2013-10-17 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  6:42 3.12.0-rc5+ reproducible crash at kernel/timer.c:1117 Janne Karhunen
2013-10-15  7:41 ` Janne Karhunen
2013-10-17 12:20   ` Janne Karhunen [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='CAE=NcrYi2c8XaswXJOGENm7QLgps+OvYMVgz5-OTWud3f3a+Mg@mail.gmail.com' \
    --to=janne.karhunen@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 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).