linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Wim Van Sebroeck <wim@iguana.be>,
	Ingo Molnar <mingo@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-watchdog@vger.kernel.org, x86@kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-next <linux-next@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [next-20130227] kernel NULL pointer dereference [ watchdog | perf related ? ]
Date: Thu, 28 Feb 2013 08:24:41 +0100	[thread overview]
Message-ID: <CA+icZUXGGQjKAwAET81pioAfZBw8mj3MO49Mm3xc35-UY=BgTg@mail.gmail.com> (raw)
In-Reply-To: <20130227150733.GB22383@htj.dyndns.org>

On Wed, Feb 27, 2013 at 4:07 PM, Tejun Heo <tj@kernel.org> wrote:
> Replying here too just in case.
>
> On Wed, Feb 27, 2013 at 02:08:40PM +0100, Sedat Dilek wrote:
>> >> static inline void *idr_find(struct idr *idr, int id)
>> >> {
>> >>         struct idr_layer *hint = rcu_dereference_raw(idr->hint);
>> >>     86d7:       48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # 86de <perf_init_event+0x2e>
>> >>                         86da: R_X86_64_PC32     .bss+0xfc
>> >>
>> >>         if ((id & ~IDR_MASK) == hint->prefix)
>> >>     86de:       89 f2                   mov    %esi,%edx
>> >>     86e0:       30 d2                   xor    %dl,%dl
>> >>     86e2:       3b 10                   cmp    (%rax),%edx              <--- trapping insn
>> >>     86e4:       74 4a                   je     8730 <perf_init_event+0x80>
>> >>                 return rcu_dereference_raw(hint->ary[id & IDR_MASK]);
>> >>
>> >>
>> >> So 'hint' is NULL as RAX above confirms and we're not supposed to deref
>> >> NULL things.
>> >>
>> >> Looking at 29cf29e1fbb875019713eb55cf27ec35f1e5fa5e, Tejun should
>> >> probably know. CCed.
>
> Fix was posted some days ago.
>
>   http://thread.gmane.org/gmane.linux.kernel.next/26213
>
> I got Andrew's patch added to -mm message a week ago.  Not sure why it
> still hasn't showed up.  Andrew, any ideas?
>
> Thanks.
>
> --
> tejun

AFAICS the updated (correct) patch "idr: implement lookup hint" is now
in mainline.

- Sedat -

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=0ffc2a9c8072969253a20821c2c733a2cbb4c7c7

  parent reply	other threads:[~2013-02-28  7:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 11:13 [next-20130227] kernel NULL pointer dereference [ watchdog | perf related ? ] Sedat Dilek
2013-02-27 11:57 ` Wim Van Sebroeck
2013-02-27 12:23 ` Borislav Petkov
2013-02-27 12:51   ` Sedat Dilek
2013-02-27 13:08     ` Sedat Dilek
2013-02-27 15:07       ` Tejun Heo
2013-02-27 15:56         ` Sedat Dilek
2013-02-27 16:08           ` Borislav Petkov
2013-02-27 16:14             ` Sedat Dilek
2013-02-27 16:46               ` Borislav Petkov
2013-02-28  7:24         ` Sedat Dilek [this message]
2013-02-28  7:27           ` Sedat Dilek

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='CA+icZUXGGQjKAwAET81pioAfZBw8mj3MO49Mm3xc35-UY=BgTg@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tj@kernel.org \
    --cc=wim@iguana.be \
    --cc=x86@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).