All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Hari Vyas <hari.vyas@broadcom.com>
Cc: kbuild-all@01.org, bhelgaas@google.com, benh@kernel.crashing.org,
	linux-pci@vger.kernel.org, ray.jui@broadcom.com,
	Hari Vyas <hari.vyas@broadcom.com>
Subject: Re: [PATCH v2 1/3] PCI: Data corruption happening due to race condition
Date: Fri, 29 Jun 2018 22:38:32 +0800	[thread overview]
Message-ID: <201806292043.ZdTEvlDh%fengguang.wu@intel.com> (raw)
In-Reply-To: <1530268061-17324-2-git-send-email-hari.vyas@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 7095 bytes --]

Hi Hari,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on v4.18-rc2 next-20180629]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hari-Vyas/PCI-Data-corruption-happening-due-to-race-condition/20180629-203647
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-randconfig-x005-201825 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Hari-Vyas/PCI-Data-corruption-happening-due-to-race-condition/20180629-203647 HEAD 75ee48282af54fe77cb0ac092623577327440033 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/pci/hotplug/acpiphp_glue.c: In function 'enable_slot':
>> drivers/pci/hotplug/acpiphp_glue.c:512:13: error: 'struct pci_dev' has no member named 'is_added'; did you mean 'is_managed'?
      if (!dev->is_added)
                ^~~~~~~~
                is_managed

vim +512 drivers/pci/hotplug/acpiphp_glue.c

84c8b58ed3 Mika Westerberg   2018-05-29  456  
^1da177e4c Linus Torvalds    2005-04-16  457  /**
a1d0abcea8 Rafael J. Wysocki 2013-07-13  458   * enable_slot - enable, configure a slot
^1da177e4c Linus Torvalds    2005-04-16  459   * @slot: slot to be enabled
^1da177e4c Linus Torvalds    2005-04-16  460   *
^1da177e4c Linus Torvalds    2005-04-16  461   * This function should be called per *physical slot*,
^1da177e4c Linus Torvalds    2005-04-16  462   * not per each slot object in ACPI namespace.
^1da177e4c Linus Torvalds    2005-04-16  463   */
10874f5a00 Bjorn Helgaas     2014-04-14  464  static void enable_slot(struct acpiphp_slot *slot)
^1da177e4c Linus Torvalds    2005-04-16  465  {
^1da177e4c Linus Torvalds    2005-04-16  466  	struct pci_dev *dev;
bda46dbb66 Rafael J. Wysocki 2013-07-13  467  	struct pci_bus *bus = slot->bus;
^1da177e4c Linus Torvalds    2005-04-16  468  	struct acpiphp_func *func;
84c8b58ed3 Mika Westerberg   2018-05-29  469  
84c8b58ed3 Mika Westerberg   2018-05-29  470  	if (bus->self && hotplug_is_native(bus->self)) {
84c8b58ed3 Mika Westerberg   2018-05-29  471  		/*
84c8b58ed3 Mika Westerberg   2018-05-29  472  		 * If native hotplug is used, it will take care of hotplug
84c8b58ed3 Mika Westerberg   2018-05-29  473  		 * slot management and resource allocation for hotplug
84c8b58ed3 Mika Westerberg   2018-05-29  474  		 * bridges. However, ACPI hotplug may still be used for
84c8b58ed3 Mika Westerberg   2018-05-29  475  		 * non-hotplug bridges to bring in additional devices such
84c8b58ed3 Mika Westerberg   2018-05-29  476  		 * as a Thunderbolt host controller.
84c8b58ed3 Mika Westerberg   2018-05-29  477  		 */
84c8b58ed3 Mika Westerberg   2018-05-29  478  		for_each_pci_bridge(dev, bus) {
84c8b58ed3 Mika Westerberg   2018-05-29  479  			if (PCI_SLOT(dev->devfn) == slot->device)
84c8b58ed3 Mika Westerberg   2018-05-29  480  				acpiphp_native_scan_bridge(dev);
84c8b58ed3 Mika Westerberg   2018-05-29  481  		}
84c8b58ed3 Mika Westerberg   2018-05-29  482  		pci_assign_unassigned_bridge_resources(bus->self);
84c8b58ed3 Mika Westerberg   2018-05-29  483  	} else {
d66ecb7220 Jiang Liu         2013-06-23  484  		LIST_HEAD(add_list);
84c8b58ed3 Mika Westerberg   2018-05-29  485  		int max, pass;
^1da177e4c Linus Torvalds    2005-04-16  486  
ab1225901d Mika Westerberg   2013-10-30  487  		acpiphp_rescan_slot(slot);
15a1ae7487 Kristen Accardi   2006-02-23  488  		max = acpiphp_max_busnr(bus);
42f49a6ae5 Rajesh Shah       2005-04-28  489  		for (pass = 0; pass < 2; pass++) {
24a0c654d7 Andy Shevchenko   2017-10-20  490  			for_each_pci_bridge(dev, bus) {
42f49a6ae5 Rajesh Shah       2005-04-28  491  				if (PCI_SLOT(dev->devfn) != slot->device)
42f49a6ae5 Rajesh Shah       2005-04-28  492  					continue;
a1d0abcea8 Rafael J. Wysocki 2013-07-13  493  
42f49a6ae5 Rajesh Shah       2005-04-28  494  				max = pci_scan_bridge(bus, dev, max, pass);
1f96a965e3 Yinghai Lu        2013-01-21  495  				if (pass && dev->subordinate) {
1f96a965e3 Yinghai Lu        2013-01-21  496  					check_hotplug_bridge(slot, dev);
d66ecb7220 Jiang Liu         2013-06-23  497  					pcibios_resource_survey_bus(dev->subordinate);
84c8b58ed3 Mika Westerberg   2018-05-29  498  					__pci_bus_size_bridges(dev->subordinate,
84c8b58ed3 Mika Westerberg   2018-05-29  499  							       &add_list);
c64b5eead9 Kristen Accardi   2005-12-14  500  				}
42f49a6ae5 Rajesh Shah       2005-04-28  501  			}
1f96a965e3 Yinghai Lu        2013-01-21  502  		}
d66ecb7220 Jiang Liu         2013-06-23  503  		__pci_bus_assign_resources(bus, &add_list, NULL);
84c8b58ed3 Mika Westerberg   2018-05-29  504  	}
2dc41281b1 Rafael J. Wysocki 2013-09-06  505  
8e5dce3522 Kristen Accardi   2005-10-18  506  	acpiphp_sanitize_bus(bus);
81ee57326c Bjorn Helgaas     2014-08-28  507  	pcie_bus_configure_settings(bus);
d060705091 Shaohua Li        2010-02-25  508  	acpiphp_set_acpi_region(slot);
69643e4829 Ian Campbell      2011-05-11  509  
69643e4829 Ian Campbell      2011-05-11  510  	list_for_each_entry(dev, &bus->devices, bus_list) {
69643e4829 Ian Campbell      2011-05-11  511  		/* Assume that newly added devices are powered on already. */
69643e4829 Ian Campbell      2011-05-11 @512  		if (!dev->is_added)
69643e4829 Ian Campbell      2011-05-11  513  			dev->current_state = PCI_D0;
69643e4829 Ian Campbell      2011-05-11  514  	}
69643e4829 Ian Campbell      2011-05-11  515  
42f49a6ae5 Rajesh Shah       2005-04-28  516  	pci_bus_add_devices(bus);
42f49a6ae5 Rajesh Shah       2005-04-28  517  
f382a086f3 Amos Kong         2011-11-25  518  	slot->flags |= SLOT_ENABLED;
58c08628c4 Alex Chiang       2009-10-26  519  	list_for_each_entry(func, &slot->funcs, sibling) {
9d911d7903 Alex Chiang       2009-05-21  520  		dev = pci_get_slot(bus, PCI_DEVFN(slot->device,
^1da177e4c Linus Torvalds    2005-04-16  521  						  func->function));
f382a086f3 Amos Kong         2011-11-25  522  		if (!dev) {
f382a086f3 Amos Kong         2011-11-25  523  			/* Do not set SLOT_ENABLED flag if some funcs
f382a086f3 Amos Kong         2011-11-25  524  			   are not added. */
9337a49362 Mika Westerberg   2018-05-24  525  			slot->flags &= ~SLOT_ENABLED;
551bcb75b3 MUNEDA Takahiro   2006-03-22  526  			continue;
f382a086f3 Amos Kong         2011-11-25  527  		}
^1da177e4c Linus Torvalds    2005-04-16  528  	}
^1da177e4c Linus Torvalds    2005-04-16  529  }
^1da177e4c Linus Torvalds    2005-04-16  530  

:::::: The code at line 512 was first introduced by commit
:::::: 69643e4829c5cd13bafe44a6b9f3eb2086e0f618 PCI hotplug: acpiphp: assume device is in state D0 after powering on a slot.

:::::: TO: Ian Campbell <ian.campbell@citrix.com>
:::::: CC: Jesse Barnes <jbarnes@virtuousgeek.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29890 bytes --]

  reply	other threads:[~2018-06-29 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 10:27 [PATCH v2 0/3] PCI: Data corruption happening due to race condition Hari Vyas
2018-06-29 10:27 ` [PATCH v2 1/3] " Hari Vyas
2018-06-29 14:38   ` kbuild test robot [this message]
2018-06-29 18:22   ` kbuild test robot
2018-07-01 14:06   ` Lukas Wunner
2018-07-02 14:20     ` Hari Vyas
2018-06-29 10:27 ` [PATCH v2 2/3] PCI: use new pci function to get device addition state Hari Vyas
2018-06-29 10:27 ` [PATCH v2 3/3] PCI: Hotplug: " Hari Vyas

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=201806292043.ZdTEvlDh%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=hari.vyas@broadcom.com \
    --cc=kbuild-all@01.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ray.jui@broadcom.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.