Re: [PATCH v2 1/2] drivers/of: validate live-tree string properties before string use
From: Pengpeng Hou
Date: Thu May 07 2026 - 04:22:10 EST
Hi Rob,
Thanks for catching this. You are right, I missed a lock recursion in
v2: __of_node_is_type() was changed to call of_property_match_string(),
but that helper takes devtree_lock. __of_node_is_type() is also used
from paths that already hold devtree_lock, including
of_find_node_by_type(), of_match_node(), and
of_find_matching_node_and_match(), so v2 can deadlock during early
boot.
I will send a v3 that keeps the device_type string bounded, but uses
__of_get_property() directly inside __of_node_is_type() so the helper
remains safe under devtree_lock.
Sorry about that.
Thanks,
Pengpeng