From: Tony Battersby <tonyb@cybernetics.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>,
Yazen Ghannam <yazen.ghannam@amd.com>,
linux-edac@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: lk 4.7 regression: EDAC, amd64_edac: Drop pci_register_driver() use
Date: Wed, 15 Jun 2016 17:43:42 -0400 [thread overview]
Message-ID: <5761CC0E.4040102@cybernetics.com> (raw)
In-Reply-To: <20160615211249.GK30309@pd.tnic>
On 06/15/2016 05:12 PM, Borislav Petkov wrote:
> On Wed, Jun 15, 2016 at 04:46:40PM -0400, Tony Battersby wrote:
>> The following commit is causing an oops:
>>
>> 3f37a36b6282 ("EDAC, amd64_edac: Drop pci_register_driver() use")
>>
>> The oops happens when I "modprobe amd64_edac_mod" on an Intel
>> Xeon-based system, or when booting the same system with amd64_edac
>> built-in. Obviously the module is not meant for this hardware, but it
>> tries to load anyway and then oopses.
> Hmm, that shouldn't happen. AFAICT, amd_cache_northbridges() doesn't
> prevent us from loading as it should.
>
> Can you send me your .config please? Privately is fine too.
>
> It is late here so I can only think of this totally untested fix right
> now:
>
> ---
> diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
> index a147e676fc7b..b913c6173c1b 100644
> --- a/arch/x86/kernel/amd_nb.c
> +++ b/arch/x86/kernel/amd_nb.c
> @@ -72,7 +72,7 @@ int amd_cache_northbridges(void)
> i++;
>
> if (i == 0)
> - return 0;
> + return -1;
>
> nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
> if (!nb)
> ---
>
> More staring tomorrow.
>
> Thanks!
>
With that patch applied, modprobe amd64_edac_mod correctly reports "No
such device" and everything is fine. I also get a new line in dmesg on
boot:
amd_nb: Cannot enumerate AMD northbridges
You might want to consider using -ENODEV instead of -1 for callers such
as init_amd_nbs() that use the error value.
Tony
next prev parent reply other threads:[~2016-06-15 21:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 20:46 lk 4.7 regression: EDAC, amd64_edac: Drop pci_register_driver() use Tony Battersby
2016-06-15 21:12 ` Borislav Petkov
2016-06-15 21:43 ` Tony Battersby [this message]
2016-06-15 21:50 ` Borislav Petkov
2016-06-15 21:58 ` Tony Battersby
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=5761CC0E.4040102@cybernetics.com \
--to=tonyb@cybernetics.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yazen.ghannam@amd.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;
as well as URLs for NNTP newsgroup(s).