mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: kernel test robot <fengguang.wu@intel.com>
Cc: LKP <lkp@01.org>, LKML <linux-kernel@vger.kernel.org>,
	Don Zickus <dzickus@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	wfg@linux.intel.com, Peter Zijlstra <peterz@infradead.org>
Subject: Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG: unable to handle kernel NULL pointer dereference at 0000000000000208
Date: Fri, 15 Sep 2017 18:24:20 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1709151820250.1833@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1709151452470.1890@nanos>

On Fri, 15 Sep 2017, Thomas Gleixner wrote:

> On Fri, 15 Sep 2017, Thomas Gleixner wrote:
> 
> > On Fri, 15 Sep 2017, kernel test robot wrote:
> > > [    0.035023] CPU: Intel Common KVM processor (family: 0xf, model: 0x6, stepping: 0x1)
> > > [    0.042302] Performance Events: unsupported Netburst CPU model 6 no PMU driver, software events only.
> > 
> > Cute. So there is no supported PMU, but for some unknown reason the lockup
> > detector can create an event, otherwise the perf availaibility check in
> > lockup_detector_init() would fail ....
> > 
> > Peter???
> 
> In my VM the corresponding dmesg is:
> 
> [    0.038086] Performance Events: unsupported p6 CPU model 61 no PMU driver, software events only.
> [    0.041031] Hierarchical SRCU implementation.
> [    0.046210] NMI watchdog: Perf event create on CPU 0 failed with -2
> [    0.046980] NMI watchdog: Perf NMI watchdog permanetely disabled
> 
> Confused

I still can't reproduce. Can you please apply the debug patch below and
provide the output?

Thanks,

	tglx

8<-----------------

diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c
index b2931154b5f2..e6c9ca516945 100644
--- a/kernel/watchdog_hld.c
+++ b/kernel/watchdog_hld.c
@@ -171,6 +171,7 @@ static int hardlockup_detector_event_create(void)
 	/* Try to register using hardware perf events */
 	evt = perf_event_create_kernel_counter(wd_attr, cpu, NULL,
 					       watchdog_overflow_callback, NULL);
+	pr_info("EVT create on CPU %u returned %p\n", cpu, evt);
 	if (IS_ERR(evt)) {
 		pr_info("Perf event create on CPU %d failed with %ld\n", cpu,
 			PTR_ERR(evt));
@@ -221,7 +222,10 @@ void hardlockup_detector_perf_cleanup(void)
 		struct perf_event *event = per_cpu(watchdog_ev, cpu);
 
 		per_cpu(watchdog_ev, cpu) = NULL;
-		perf_event_release_kernel(event);
+		pr_info("EVT on CPU %u in dead mask: %p\n",  cpu, event);
+		if (event)
+			perf_event_release_kernel(event);
+
 	}
 	cpumask_clear(&dead_events_mask);
 }

  reply	other threads:[~2017-09-15 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 21:47 kernel test robot
2017-09-15  7:50 ` Thomas Gleixner
2017-09-15 12:54   ` Thomas Gleixner
2017-09-15 16:24     ` Thomas Gleixner [this message]
2017-09-16 12:46       ` Fengguang Wu
2017-09-16 17:35         ` Thomas Gleixner
2017-09-16 17:55           ` Linus Torvalds
2017-09-16 18:12             ` Thomas Gleixner
2017-09-16 18:23               ` Linus Torvalds
2017-09-16 21:47                 ` Thomas Gleixner
2017-09-16 22:02                   ` Linus Torvalds

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=alpine.DEB.2.20.1709151820250.1833@nanos \
    --to=tglx@linutronix.de \
    --cc=dzickus@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wfg@linux.intel.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

all inboxes | Powered by JetHome®