All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Tony Luck" <tony.luck@intel.com>,
	linux-edac@vger.kernel.org,
	"Yazen Ghannam" <Yazen.Ghannam@amd.com>,
	"Aravind Gopalakrishnan" <aravindksg.lkml@gmail.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "John Clemens" <clemej@gmail.com>,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: x86/mce/AMD: Make sure banks were initialized before accessing them
Date: Tue, 27 Nov 2018 13:09:20 +0100	[thread overview]
Message-ID: <20181127120920.GB26395@zn.tnic> (raw)

On Tue, Nov 27, 2018 at 11:17:00AM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> It may happen amd_threshold_interrupt() fires before banks get setup as
> part of the threshold_init_device() call. Such a case requires a proper
> check to avoid NULL pointer dereference.

Yeah, and this code is wrong as hell. :-\

We should be initializing the banks and *then* setup the thresholding
interrupt vector, when all setup has succeeded, not before.

Lemme think about it a bit.

Thx for the report.

             reply	other threads:[~2018-11-27 12:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 12:09 Borislav Petkov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-16 16:42 x86/mce/AMD: Make sure banks were initialized before accessing them Rafal Milecki
2019-03-07 17:08 Borislav Petkov
2019-03-07 16:55 Yazen Ghannam
2019-03-07 16:53 Borislav Petkov
2019-03-07 16:15 Yazen Ghannam
2019-03-07 14:53 Borislav Petkov
2019-03-07 12:55 Rafal Milecki
2018-12-18 19:05 Borislav Petkov
2018-12-16 22:06 Rafał Miłecki
2018-12-16 10:59 Rafał Miłecki
2018-12-16 10:33 Rafał Miłecki
2018-12-16 10:22 Borislav Petkov
2018-12-15 13:04 Rafał Miłecki
2018-11-30 10:59 Borislav Petkov
2018-11-29 14:30 Rafal Milecki
2018-11-29 13:12 Borislav Petkov
2018-11-29  8:52 Rafal Milecki
2018-11-29  8:37 Borislav Petkov
2018-11-27 16:29 Borislav Petkov
2018-11-27 15:02 Yazen Ghannam
2018-11-27 13:40 Borislav Petkov
2018-11-27 13:33 Rafal Milecki
2018-11-27 13:29 Ingo Molnar
2018-11-27 13:26 Borislav Petkov
2018-11-27 13:06 Rafał Miłecki
2018-11-27 12:38 Borislav Petkov
2018-11-27 10:17 Rafał Miłecki

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=20181127120920.GB26395@zn.tnic \
    --to=bp@alien8.de \
    --cc=Yazen.Ghannam@amd.com \
    --cc=aravindksg.lkml@gmail.com \
    --cc=clemej@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafal@milecki.pl \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=zajec5@gmail.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 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.