lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 10 Dec 2015 21:06:29 -0800 From: Yinghai Lu <yinghai@...nel.org> To: Bjorn Helgaas <bhelgaas@...gle.com>, David Miller <davem@...emloft.net>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Wei Yang <weiyang@...ux.vnet.ibm.com>, TJ <linux@....tj>, Yijing Wang <wangyijing@...wei.com>, Khalid Aziz <khalid.aziz@...cle.com> Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org, Yinghai Lu <yinghai@...nel.org> Subject: [PATCH v9 33/60] PCI: Add debug printout during releasing partial assigned resources We try to assign required+optional at first, and we only accept the result if all resources get allocated. Otherwise will release assigned in the list, and try to assign required and expand to optional. We have to do that to make sure any required has priority over any optional. When that happens, we only print out "assigned" info, that is confusing as it looks like same range is assigned to two peer resources at the same time. Add printout for releasing so we have whole picture in debug messages. Signed-off-by: Yinghai Lu <yinghai@...nel.org> --- drivers/pci/setup-bus.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index e9e67bc..0fc9659 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -526,9 +526,17 @@ static void __assign_resources_sorted(struct list_head *head, free_list(&local_fail_head); /* Release assigned resource */ - list_for_each_entry(dev_res, head, list) - if (dev_res->res->parent) - release_resource(dev_res->res); + list_for_each_entry(dev_res, head, list) { + struct resource *res = dev_res->res; + + if (res->parent) { + dev_printk(KERN_DEBUG, &dev_res->dev->dev, + "BAR %d: released %pR\n", + (int)(res - &dev_res->dev->resource[0]), + res); + release_resource(res); + } + } /* Restore start/end/flags from saved list */ list_for_each_entry(save_res, &save_head, list) { struct resource *res = save_res->res; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists