Commit 914d9d8
committed
of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock
While originally it was fine to format strings using "%pOF" while
holding devtree_lock, this now causes a deadlock. Lockdep reports:
of_get_parent from of_fwnode_get_parent+0x18/0x24
^^^^^^^^^^^^^
of_fwnode_get_parent from fwnode_count_parents+0xc/0x28
fwnode_count_parents from fwnode_full_name_string+0x18/0xac
fwnode_full_name_string from device_node_string+0x1a0/0x404
device_node_string from pointer+0x3c0/0x534
pointer from vsnprintf+0x248/0x36c
vsnprintf from vprintk_store+0x130/0x3b4
Fix this by moving the printing in __of_changeset_entry_apply() outside
the lock. As the only difference in the multiple prints is the action
name, use the existing "action_names" to refactor the prints into a
single print.
Fixes: a92eb76 ("lib/vsprintf: Make use of fwnode API to obtain node names and separators")
Cc: [email protected]
Reported-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Herring <[email protected]>1 parent 0aeae37 commit 914d9d8
1 file changed
Lines changed: 9 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
620 | 619 | | |
621 | 620 | | |
622 | 621 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | 622 | | |
630 | 623 | | |
631 | 624 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | 625 | | |
639 | 626 | | |
640 | 627 | | |
| |||
648 | 635 | | |
649 | 636 | | |
650 | 637 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | 638 | | |
658 | 639 | | |
659 | 640 | | |
660 | 641 | | |
661 | 642 | | |
662 | 643 | | |
663 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
664 | 647 | | |
| 648 | + | |
665 | 649 | | |
666 | 650 | | |
667 | 651 | | |
| |||
947 | 931 | | |
948 | 932 | | |
949 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
950 | 937 | | |
951 | 938 | | |
952 | 939 | | |
| |||
0 commit comments