mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-04 07:51:19 +00:00
It seems that of_find_compatible_node has a weird calling convention in
which it calls of_node_put() on the "from" node argument, instead of
leaving that up to the caller. This comes from the fact that
of_find_compatible_node with a non-NULL "from" argument it only supposed
to be used as the iterator function of for_each_compatible_node(). OF
iterator functions call of_node_get on the next OF node and of_node_put()
on the previous one.
When of_find_compatible_node calls of_node_put, it actually never
expects the refcount to drop to zero, because the call is done under the
atomic devtree_lock context, and when the refcount drops to zero it
triggers a kobject and a sysfs file deletion, which assume blocking
context.
So any driver call to of_find_compatible_node is probably buggy because
an unexpected of_node_put() takes place.
What should be done is to use the of_get_compatible_child() function.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| sja1105_clocking.c | ||
| sja1105_devlink.c | ||
| sja1105_dynamic_config.c | ||
| sja1105_dynamic_config.h | ||
| sja1105_ethtool.c | ||
| sja1105_flower.c | ||
| sja1105_main.c | ||
| sja1105_mdio.c | ||
| sja1105_ptp.c | ||
| sja1105_ptp.h | ||
| sja1105_spi.c | ||
| sja1105_static_config.c | ||
| sja1105_static_config.h | ||
| sja1105_tas.c | ||
| sja1105_tas.h | ||
| sja1105_vl.c | ||
| sja1105_vl.h | ||
| sja1105.h | ||