Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1023558iob; Fri, 13 May 2022 20:02:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8FBgP94W8PSdskFoWeF9bHzsTIJGFwAsv/1QJoQnhIjmN2wcz7JbbmE//B1n8xZipKcpb X-Received: by 2002:a5d:48ce:0:b0:20a:bb9b:62a3 with SMTP id p14-20020a5d48ce000000b0020abb9b62a3mr6084321wrs.307.1652497358278; Fri, 13 May 2022 20:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652497358; cv=none; d=google.com; s=arc-20160816; b=oG+MuCPCEiAdN7OA/93iuuj2gcXfJVcq5KOiBOn6INt3/SydS4HrYg7mcrZUEiIbtr +a8lxlWNcfmg82gC6bLIsQyFAbFthUiwc2VEr+WOgZjhM2lBw1l4hjC2DEaex21dkyce tZdK4vsBN3DCsus7HLROt+hsYIN8SoAwiUhXoHKdbRzj3jK3tXKy3ySjUYzPuAovgTGS C8QszS4w3M59ywy5gpmdMSZEo5sg5fmOcUCmJgYuOK6rdM2ylvmTjDUvS/nuD99oiZFV TFybzgUNi41WlxR8QmCwzez1ZJQoFSj5NXpuEFmZTspqGDAA6ntD37vyX8xUsVLecOr0 IIAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zkQQxyas1LbP6QOEu5UNJ/tVoyZBTqW+b9OYJCdvcYw=; b=OsNsm2+yZkwNvRvRpmUKvbzT4x7PRt1l2+SOoRsxZRAyJ6HVcf2YaSoX1qo6rCl8eC T62hsqmQmEojGZsZ3yxv+Agv72DS7nqmYpTTy2+4nf4uiVzmi+nYcQwjX9C2DhtJ7620 UZKXt7rMLmHoq6ZFhgDQDjrAw0pSBlNilWKuCqwmr+2/+NOE4NkO7ub5vllj2uzjUm7A 1QdngKHw+VCs0++yPxBEj9W7UR/CRvFOpHm1pJRmQDmlPccV8BAd9DR660SRRjNV8P5e QNILmXYXKVsB1eWtZXfj7oy9GWYLmIJ+8nWS0sjIZ2hVFFxUaEA0l/bBaDAxllrm0vJZ dYZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ozsb0R+H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k23-20020adfd237000000b0020c5472c3b3si3324375wrh.4.2022.05.13.20.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ozsb0R+H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5A2023AA21A; Fri, 13 May 2022 16:45:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345997AbiEKSAc (ORCPT + 99 others); Wed, 11 May 2022 14:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345980AbiEKSAI (ORCPT ); Wed, 11 May 2022 14:00:08 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BCC6FD01; Wed, 11 May 2022 11:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652292005; x=1683828005; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Ea+lYRPzihmO8EVmbnlP0uLWZcsNp5NT/ZPU0VZFjGk=; b=Ozsb0R+HKLUH0PPr6szmm0OSRc+17gnBRn99+Yog4JYInkc909fTlSid 4ovbTzdKa2pE5K8oir7ufZ7NRJrsRBNDK41/rYEmGi5MuzZ80webNVNZw P87MzHJxi9FCI7MeSuFOKaZu3yB3fAL3hudmRpzbmXndJ2oFPcBjE7UF/ RapinTMEDrYnpN6LBFW6pkTpWw3fWm3+qP731MiNMptkuOanlQ4ZKhER8 h3kUL4udz3AA9aEniN5In/6hopmvHlkcUnK7/hAERko3WktEswGliu4JK 23OawPeXLLP4Mx5hCsKYPeMftDkrFhpTGWPFNgURLqcnIWB2gnhsmX4Nj g==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="295014431" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="295014431" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 11:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="711586936" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 11 May 2022 11:00:02 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1noqd0-000JNw-1P; Wed, 11 May 2022 18:00:02 +0000 Date: Thu, 12 May 2022 01:59:19 +0800 From: kernel test robot To: Miaoqian Lin , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Greg Kroah-Hartman , Doug Thompson , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kbuild-all@lists.01.org, linux-media@vger.kernel.org, linmq006@gmail.com Subject: Re: [PATCH] EDAC: Fix some refcount leaks Message-ID: <202205120119.sArUU4SY-lkp@intel.com> References: <20220511081402.19784-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511081402.19784-1-linmq006@gmail.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miaoqian, Thank you for the patch! Yet something to improve: [auto build test ERROR on ras/edac-for-next] [also build test ERROR on linux/master linus/master v5.18-rc6 next-20220511] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Miaoqian-Lin/EDAC-Fix-some-refcount-leaks/20220511-161440 base: https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20220512/202205120119.sArUU4SY-lkp@intel.com/config) compiler: powerpc-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/e5e3d8b94764dd1abe3c99881483c3f6dee8030a git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Miaoqian-Lin/EDAC-Fix-some-refcount-leaks/20220511-161440 git checkout e5e3d8b94764dd1abe3c99881483c3f6dee8030a # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/edac/edac_device_sysfs.c: In function 'edac_device_create_instance': >> drivers/edac/edac_device_sysfs.c:640:17: error: label 'edac_device_create_instance' used but not defined 640 | goto edac_device_create_instance; | ^~~~ vim +/edac_device_create_instance +640 drivers/edac/edac_device_sysfs.c 604 605 /* 606 * edac_device_create_instance 607 * create just one instance of an edac_device 'instance' 608 */ 609 static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev, 610 int idx) 611 { 612 int i, j; 613 int err; 614 struct edac_device_instance *instance; 615 struct kobject *main_kobj; 616 617 instance = &edac_dev->instances[idx]; 618 619 /* Init the instance's kobject */ 620 memset(&instance->kobj, 0, sizeof(struct kobject)); 621 622 instance->ctl = edac_dev; 623 624 /* bump the main kobject's reference count for this controller 625 * and this instance is dependent on the main 626 */ 627 main_kobj = kobject_get(&edac_dev->kobj); 628 if (!main_kobj) { 629 err = -ENODEV; 630 goto err_out; 631 } 632 633 /* Formally register this instance's kobject under the edac_device */ 634 err = kobject_init_and_add(&instance->kobj, &ktype_instance_ctrl, 635 &edac_dev->kobj, "%s", instance->name); 636 if (err != 0) { 637 edac_dbg(2, "Failed to register instance '%s'\n", 638 instance->name); 639 kobject_put(main_kobj); > 640 goto edac_device_create_instance; 641 } 642 643 edac_dbg(4, "now register '%d' blocks for instance %d\n", 644 instance->nr_blocks, idx); 645 646 /* register all blocks of this instance */ 647 for (i = 0; i < instance->nr_blocks; i++) { 648 err = edac_device_create_block(edac_dev, instance, 649 &instance->blocks[i]); 650 if (err) { 651 /* If any fail, remove all previous ones */ 652 for (j = 0; j < i; j++) 653 edac_device_delete_block(edac_dev, 654 &instance->blocks[j]); 655 goto err_release_instance_kobj; 656 } 657 } 658 kobject_uevent(&instance->kobj, KOBJ_ADD); 659 660 edac_dbg(4, "Registered instance %d '%s' kobject\n", 661 idx, instance->name); 662 663 return 0; 664 665 /* error unwind stack */ 666 err_release_instance_kobj: 667 kobject_put(&instance->kobj); 668 669 err_out: 670 return err; 671 } 672 -- 0-DAY CI Kernel Test Service https://01.org/lkp