From: kernel test robot <lkp@intel.com>
To: Miaoqian Lin <linmq006@gmail.com>, Borislav Petkov <bp@alien8.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Robert Richter <rric@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Doug Thompson <dougthompson@xmission.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-media@vger.kernel.org, linmq006@gmail.com
Subject: Re: [PATCH] EDAC: Fix some refcount leaks
Date: Wed, 11 May 2022 22:33:41 +0800 [thread overview]
Message-ID: <202205112212.TdxIloxH-lkp@intel.com> (raw)
In-Reply-To: <20220511081402.19784-1-linmq006@gmail.com>
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: arm64-randconfig-r032-20220509 (https://download.01.org/0day-ci/archive/20220511/202205112212.TdxIloxH-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 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=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/edac/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/edac/edac_device_sysfs.c:640:8: error: use of undeclared label 'edac_device_create_instance'
goto edac_device_create_instance;
^
1 error generated.
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
next prev parent reply other threads:[~2022-05-11 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 8:14 [PATCH] EDAC: Fix some refcount leaks Miaoqian Lin
2022-05-11 14:33 ` kernel test robot [this message]
2022-05-11 17:59 ` kernel test robot
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=202205112212.TdxIloxH-lkp@intel.com \
--to=lkp@intel.com \
--cc=bp@alien8.de \
--cc=dougthompson@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=linmq006@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=tony.luck@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.