Skip to content

Commit 02dfc6a

Browse files
geerturobherring
authored andcommitted
of: unittest: Run overlay apply/revert sequence three times
Run the test for the overlay apply/revert sequence three times, to test if there are unbalanced of_node_put() calls causing reference counts to become negative. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/a9fb4eb560c58d11a7f167bc78a137b46e76cf15.1692699743.git.geert+renesas@glider.be Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 26409dd commit 02dfc6a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/of/unittest.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3066,6 +3066,7 @@ static void __init of_unittest_overlay_notify(void)
30663066
static void __init of_unittest_overlay(void)
30673067
{
30683068
struct device_node *bus_np = NULL;
3069+
unsigned int i;
30693070

30703071
if (platform_driver_register(&unittest_driver)) {
30713072
unittest(0, "could not register unittest driver\n");
@@ -3103,7 +3104,8 @@ static void __init of_unittest_overlay(void)
31033104
of_unittest_overlay_2();
31043105
of_unittest_overlay_3();
31053106
of_unittest_overlay_4();
3106-
of_unittest_overlay_5();
3107+
for (i = 0; i < 3; i++)
3108+
of_unittest_overlay_5();
31073109
of_unittest_overlay_6();
31083110
of_unittest_overlay_8();
31093111

0 commit comments

Comments
 (0)