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-20191127 edac warns (was Re: edac KASAN warning in experimental arm64 allmodconfig boot)
Date: Thu, 28 Nov 2019 11:02:32 +0000	[thread overview]
Message-ID: <7131f2b9-d4c3-b858-2d17-c56003789df2@huawei.com> (raw)
In-Reply-To: <20191127205400.cip7hdbhcdokofel@rric.localdomain>


Hi Robert,

> thank you for testing.

I'm just stumbling across these, TBH.

> 
> On 27.11.19 17:07:33, John Garry wrote:
> 
>> [snip]
>>
>> I have test enabled:
>> +CONFIG_DEBUG_TEST_DRIVER_REMOVE=y
>> +CONFIG_KASAN=y
>> +CONFIG_DEBUG_KMEMLEAK=y
> 
> Is this a regression (did it work before?), or a new test that you
> newly run?

linuxnext-20191119 does not look to have the issue - that's when I 
cherry-pick your refcount fix - but has lots of memory leaks:

root@(none)$
root@(none)$ echo scan > /sys/kernel/debug/kmemleak
root@(none)$ [  121.639978] kmemleak: 128 new suspected memory leaks 
(see /sys/kernel/debug/kmemleak)

root@(none)$ cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff00236c24ba00 (size 256):
   comm "swapper/0", pid 1, jiffies 4294897826 (age 107.824s)
   hex dump (first 32 bytes):
     00 40 2d 3c 23 00 ff ff 00 48 2d 3c 23 00 ff ff  .@-<#....H-<#...
     00 50 2d 3c 23 00 ff ff 00 58 2d 3c 23 00 ff ff  .P-<#....X-<#...
   backtrace:
     [<0000000009aed8e3>] __kmalloc+0x1e0/0x2c0
     [<00000000bf599427>] edac_mc_alloc+0x31c/0x888
     [<00000000c070e314>] ghes_edac_register+0x15c/0x390
     [<00000000e4aad1c2>] ghes_probe+0x28c/0x5f0
     [<0000000079c357cb>] platform_drv_probe+0x70/0xd8
     [<00000000d4ab9188>] really_probe+0x118/0x548
     [<00000000763d50f1>] driver_probe_device+0x7c/0x148
     [<0000000058e623c3>] device_driver_attach+0x94/0xa0
     [<00000000d7cb679d>] __driver_attach+0xa4/0x110
     [<000000007d0942a0>] bus_for_each_dev+0xe8/0x158
     [<000000004cf734d1>] driver_attach+0x30/0x40
     [<000000009aa3536e>] bus_add_driver+0x234/0x2f0
     [<00000000d163cfe0>] driver_register+0xbc/0x1d0
     [<000000007e4f0ac1>] __platform_driver_register+0x7c/0x88
     [<00000000a63c8dd0>] ghes_init+0xbc/0x14c
     [<00000000356c8a7f>] do_one_initcall+0xb4/0x254
unreferenced object 0xffff00233c2d4000 (size 1024):
   comm "swapper/0", pid 1, jiffies 4294897826 (age 107.824s)
   hex dump (first 32 bytes):
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
   backtrace:
     [<000000004945469f>] kmem_cache_alloc+0x188/0x260
     [<0000000032ea779d>] edac_mc_alloc+0x38c/0x888

Unfortunately v5.4 has similar memory leaks.

Thanks,
John

  reply	other threads:[~2019-11-28 11:02 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
2019-11-27 17:07           ` linuxnext-2019127 " John Garry
2019-11-27 20:54             ` Robert Richter
2019-11-28 11:02               ` John Garry [this message]
2019-11-28 16:44                 ` linuxnext-20191127 " 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=7131f2b9-d4c3-b858-2d17-c56003789df2@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).