linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Robert Richter <rrichter@marvell.com>
Cc: Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	James Morse <james.morse@arm.com>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	wanghuiqiang <wanghuiqiang@huawei.com>,
	Xiaofei Tan <tanxiaofei@huawei.com>,
	Linuxarm <linuxarm@huawei.com>,
	"Huangming (Mark)" <huangming23@huawei.com>
Subject: Re: linuxnext-2019119 edac warns (was Re: edac KASAN warning in experimental arm64 allmodconfig boot)
Date: Tue, 26 Nov 2019 09:59:05 +0000	[thread overview]
Message-ID: <4c1bd075-75ec-8445-9595-467b88a406b3@huawei.com> (raw)
In-Reply-To: <20191122112842.tmf4lkj52hpv6tqd@rric.localdomain>

On 22/11/2019 11:28, Robert Richter wrote:
> On 21.11.19 15:23:42, John Garry wrote:
>> On 21/11/2019 14:23, Robert Richter wrote:
>>> On 21.11.19 12:34:22, John Garry wrote:
> 
>>>> [   22.046666] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.046666]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.058311] ghes_edac: Can't register at EDAC core
>>>> [   22.065402] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.065402]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.077080] ghes_edac: Can't register at EDAC core
>>>> [   22.084140] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.084140]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.095789] ghes_edac: Can't register at EDAC core
>>>> [   22.102873] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.102873]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.115442] ghes_edac: Can't register at EDAC core
>>>> [   22.122536] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.122536]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.134344] ghes_edac: Can't register at EDAC core
>>>> [   22.141441] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.141441]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.153089] ghes_edac: Can't register at EDAC core
>>>> [   22.160161] EDAC MC: bug in low-level driver: attempt to assign
>>>> [   22.160161]     duplicate mc_idx 0 in add_mc_to_global_list()
>>>> [   22.171810] ghes_edac: Can't register at EDAC core
>>>
>>> What I am more concerned is this here. In total this implies 8 ghes
>>> users that all try to register a (single-instance) ghes mc device. For
>>> non-x86 only one instance is allowed (see ghes_edac_register(), idx =
>>> 0).
> 
> I also looked into this: With refcount_inc_checked() enabled, the
> refcount is *not* increased from 0 to 1. 

Yeah, I had quickly checked this back then and I think you're right.

Thanks,
John

Under the hood only
> refcount_inc_not_zero() is called instead of refcount_inc(). So the
> refcount is still zero after an edac mc device was registered. Instead
> of sharing the edac mc device, the driver tries to allocate another mc
> device for each GHESv2 entry in the HEST table. This causes the
> 'duplicate mc_idx' message. Also, it is ok to have multiple GHESv2
> entries (your system seems to have 8 entries), e.g. to serve different
> kind of errors in the system.
> 
> Thanks,
> 
> -Robert
> .
> 


  reply	other threads:[~2019-11-26  9:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 15:18 edac KASAN warning in experimental arm64 allmodconfig boot John Garry
2019-10-14 16:09 ` Borislav Petkov
2019-10-14 16:44   ` John Garry
2019-10-14 16:15 ` James Morse
2019-10-14 16:56   ` John Garry
2019-10-14 16:57     ` Borislav Petkov
2019-11-21 12:34 ` linuxnext-2019119 edac warns (was Re: edac KASAN warning in experimental arm64 allmodconfig boot) John Garry
2019-11-21 14:23   ` Robert Richter
2019-11-21 15:23     ` John Garry
2019-11-21 21:36       ` [PATCH] EDAC/ghes: Do not warn when incrementing refcount on 0 Robert Richter
2019-11-22  9:01         ` Borislav Petkov
2019-11-26  9:57           ` John Garry
2019-11-22 11:28       ` linuxnext-2019119 edac warns (was Re: edac KASAN warning in experimental arm64 allmodconfig boot) Robert Richter
2019-11-26  9:59         ` John Garry [this message]
2019-11-27 17:07           ` linuxnext-2019127 " John Garry
2019-11-27 20:54             ` Robert Richter
2019-11-28 11:02               ` linuxnext-20191127 " John Garry
2019-11-28 16:44                 ` Borislav Petkov
2019-11-28 21:12             ` linuxnext-2019127 " Robert Richter
2019-12-02 10:23               ` John Garry
2019-12-02 11:46                 ` Robert Richter

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=4c1bd075-75ec-8445-9595-467b88a406b3@huawei.com \
    --to=john.garry@huawei.com \
    --cc=bp@alien8.de \
    --cc=huangming23@huawei.com \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mchehab@kernel.org \
    --cc=rrichter@marvell.com \
    --cc=tanxiaofei@huawei.com \
    --cc=tony.luck@intel.com \
    --cc=wanghuiqiang@huawei.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).