of: of_node_get()/of_node_put() nodes held in phandle cache
The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: NFrank Rowand <frank.rowand@sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
Showing
想要评论请 注册 或 登录