From patchwork Thu Aug 22 08:43:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 2848114 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A4B629F2F6 for ; Thu, 22 Aug 2013 08:44:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADC73204B0 for ; Thu, 22 Aug 2013 08:44:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0214204A7 for ; Thu, 22 Aug 2013 08:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752053Ab3HVIoB (ORCPT ); Thu, 22 Aug 2013 04:44:01 -0400 Received: from mga14.intel.com ([143.182.124.37]:25816 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859Ab3HVIn7 (ORCPT ); Thu, 22 Aug 2013 04:43:59 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 22 Aug 2013 01:43:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,932,1367996400"; d="scan'208";a="285253096" Received: from yhuang-dev.sh.intel.com (HELO [10.239.37.167]) ([10.239.37.167]) by AZSMGA002.ch.intel.com with ESMTP; 22 Aug 2013 01:43:35 -0700 Message-ID: <1377161014.6167.67.camel@yhuang-dev> Subject: Re: kmemleak in apei_res_add From: Huang Ying To: "Alexandra N. Kossovsky" Cc: Catalin Marinas , Len Brown , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Linux Kernel Mailing List Date: Thu, 22 Aug 2013 16:43:35 +0800 In-Reply-To: <20130821134455.GC12595@sanechka.spb.ru> References: <20130812024556.GB29956@sanechka.spb.ru> <20130821134455.GC12595@sanechka.spb.ru> X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Alexandra, On Wed, 2013-08-21 at 17:44 +0400, Alexandra N. Kossovsky wrote: > On Aug 21 10:38, Catalin Marinas wrote: > > On 12 August 2013 03:45, Alexandra N. Kossovsky > > wrote: > > > When running 3.10.3 with kmemleak enabled, I see following warnings from > > > kmemleak: > > > > > > unreferenced object 0xffff88024d2219a0 (size 32): > > > comm "swapper/0", pid 1, jiffies 4294894532 (age 26865.180s) > > > hex dump (first 32 bytes): > > > 58 de 0c 73 02 88 ff ff 58 de 0c 73 02 88 ff ff X..s....X..s.... > > > 18 50 fd 7d 00 00 00 00 3f 50 fd 7d 00 00 00 00 .P.}....?P.}.... > > > backtrace: > > > [] kmemleak_alloc+0x21/0x3e > > > [] kmemleak_alloc_recursive.constprop.58+0x16/0x18 > > > [] kmem_cache_alloc_trace+0xe6/0x12f > > > [] apei_res_add+0xb9/0xe8 > > > [] collect_res_callback+0x6d/0x7c > > > [] apei_exec_for_each_entry+0x78/0x93 > > > [] apei_exec_collect_resources+0x15/0x17 > > > [] erst_init+0x278/0x2a3 > > > [] do_one_initcall+0x7b/0x116 > > > [] kernel_init_freeable+0x13f/0x1cc > > > [] kernel_init+0x9/0xd6 > > > [] ret_from_fork+0x7c/0xb0 > > > [] 0xffffffffffffffff > > > > Are there any "APEI:" errors in the kernel log? It could be some > > freeing missing on an error path. > > No. > dmesg |grep APEI > [ 9.602274] GHES: APEI firmware first mode is enabled by APEI bit and WHEA _OSC. > Can you try the following debug patch, and send me back the output of: $ dmesg | grep apei_res Best Regards, Huang Ying --- drivers/acpi/apei/apei-base.c | 4 ++++ 1 file changed, 4 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c @@ -310,6 +310,8 @@ static int apei_res_add(struct list_head struct apei_res *res, *resn, *res_ins = NULL; unsigned long end = start + size; + pr_info("apei_res_add: %p: %lx - %lx\n", res_list, start, end); + if (end <= start) return 0; repeat: @@ -346,6 +348,7 @@ static int apei_res_sub(struct list_head struct list_head *res_list2) { struct apei_res *res1, *resn1, *res2, *res; + pr_info("apei_res_sub: %p - %p\n", res_list1, res_list2); res1 = list_entry(res_list1->next, struct apei_res, list); resn1 = list_entry(res1->list.next, struct apei_res, list); while (&res1->list != res_list1) { @@ -386,6 +389,7 @@ static void apei_res_clean(struct list_h { struct apei_res *res, *resn; + pr_info("apei_res_clean: %p\n", res_list); list_for_each_entry_safe(res, resn, res_list, list) { list_del(&res->list); kfree(res);