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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433501478-15164-2-git-send-email-ricardo.ribalda@gmail.com>
Date:	Fri,  5 Jun 2015 12:51:18 +0200
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robherring2@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	Jakub Sitnicki <jsitnicki@...il.com>,
	Mike Travis <travis@....com>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Thierry Reding <treding@...dia.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	gregkh@...uxfoundation.org, Tejun Heo <tj@...nel.org>,
	Cliff Wickman <cpw@....com>
Cc:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Subject: [PATCH 2/2] of/platform: Mark all device tree resources as SHARED

Some device tree platform do not define their resources properly. i.e.
overlapping or repeated resources.

This patch mark all device tree resources as shareable.

In the future this should only be set for the platforms that have
problems.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
---
 drivers/of/platform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ddf8e42c9367..89cb502f8812 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -136,6 +136,8 @@ struct platform_device *of_device_alloc(struct device_node *np,
 		if (of_irq_to_resource_table(np, res, num_irq) != num_irq)
 			pr_debug("not all legacy IRQ resources mapped for %s\n",
 				 np->name);
+		for (i = 0; i < num_reg + num_irq; i++, res++)
+			dev->resource[i].flags |= IORESOURCE_SHARED;
 	}
 
 	dev->dev.of_node = of_node_get(np);
-- 
2.1.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ