mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aaron Tomlin <atomlin@redhat.com>
To: Don Zickus <dzickus@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ulrich Obergfell <uobergfe@redhat.com>
Subject: Re: [PATCH] kernel/watchdog: Prevent false hardlockup on overloaded system
Date: Thu, 15 Dec 2016 18:41:15 +0000	[thread overview]
Message-ID: <20161215184114.ut2ulhhflap5bfur@atomlin.usersys.redhat.com> (raw)
In-Reply-To: <1481041033-192236-1-git-send-email-dzickus@redhat.com>

On Tue 2016-12-06 11:17 -0500, Don Zickus wrote:
> On an overloaded system, it is possible that a change in the watchdog threshold
> can be delayed long enough to trigger a false positive.
> 
> This can easily be achieved by having a cpu spinning indefinitely on a task,
> while another cpu updates watchdog threshold.
> 
> What happens is while trying to park the watchdog threads, the hrtimers on the
> other cpus trigger and reprogram themselves with the new slower watchdog
> threshold.  Meanwhile, the nmi watchdog is still programmed with the old faster
> threshold.
> 
> Because the one cpu is blocked, it prevents the thread parking on the other
> cpus from completing, which is needed to shutdown the nmi watchdog and
> reprogram it correctly.  As a result, a false positive from the nmi watchdog is
> reported.
> 
> Fix this by setting a park_in_progress flag to block all lockups
> until the parking is complete.
> 
> Fix provided by Ulrich Obergfell.
> 
> Cc: Ulrich Obergfell <uobergfe@redhat.com>
> Signed-off-by: Don Zickus <dzickus@redhat.com>
> ---
>  include/linux/nmi.h   | 1 +
>  kernel/watchdog.c     | 9 +++++++++
>  kernel/watchdog_hld.c | 3 +++
>  3 files changed, 13 insertions(+)

Looks fine to me.

Reviewed-by: Aaron Tomlin <atomlin@redhat.com>

-- 
Aaron Tomlin

  reply	other threads:[~2016-12-15 18:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 16:17 Don Zickus
2016-12-15 18:41 ` Aaron Tomlin [this message]
2016-12-19 19:54 ` Andrew Morton

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=20161215184114.ut2ulhhflap5bfur@atomlin.usersys.redhat.com \
    --to=atomlin@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dzickus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uobergfe@redhat.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®