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: <1466144820-6286-7-git-send-email-m.szyprowski@samsung.com>
Date:	Fri, 17 Jun 2016 08:26:56 +0200
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	iommu@...ts.linux-foundation.org,
	linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Cc:	Marek Szyprowski <m.szyprowski@...sung.com>,
	Joerg Roedel <joro@...tes.org>,
	Inki Dae <inki.dae@...sung.com>, Kukjin Kim <kgene@...nel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Mark Brown <broonie@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH v2 06/10] driver core: Avoid endless recursion if device has
 more than one link

This patch fixes endless recursion, which happends when device has
more than one link.

Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
---
 drivers/base/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 215cd44de761..4e778539b750 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -57,7 +57,8 @@ static int device_reorder_to_tail(struct device *dev, void *not_used)
 	device_pm_move_last(dev);
 	device_for_each_child(dev, NULL, device_reorder_to_tail);
 	list_for_each_entry(link, &dev->consumer_links, c_node)
-		device_reorder_to_tail(link->consumer, NULL);
+		if (link->consumer != dev)
+			device_reorder_to_tail(link->consumer, NULL);
 
 	return 0;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ