From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933183AbcFOVM5 (ORCPT ); Wed, 15 Jun 2016 17:12:57 -0400 Received: from mail.skyhub.de ([78.46.96.112]:38388 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbcFOVMx (ORCPT ); Wed, 15 Jun 2016 17:12:53 -0400 Date: Wed, 15 Jun 2016 23:12:49 +0200 From: Borislav Petkov To: Tony Battersby Cc: Borislav Petkov , Yazen Ghannam , linux-edac@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: Re: lk 4.7 regression: EDAC, amd64_edac: Drop pci_register_driver() use Message-ID: <20160615211249.GK30309@pd.tnic> References: <5761BEB0.9000807@cybernetics.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5761BEB0.9000807@cybernetics.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.