diff options
author | Miquel Raynal <[email protected]> | 2024-01-04 09:14:46 +0100 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2024-02-05 13:39:33 +0100 |
commit | 5ab9bbf6c678444dd99afabd44665e7f04047cc5 (patch) | |
tree | 443bee5cac029b7b46e4a913a25a6baa5a8a81e1 /scripts/rustdoc_test_builder.rs | |
parent | 59950610c0c00c7a06d8a75d2ee5d73dba4274cf (diff) |
mtd: Fix possible refcounting issue when going through partition nodes
Under normal conditions, the loop goes over all child partitions, and
'breaks' when the relevant partition is found. In this case we get a
reference to the partition node without ever releasing it. Indeed, right
after the mtd_check_of_node() function returns, we call of_node_get()
again over this very same node. It is probably safer to keep the
counters even in this helper and call of_node_put() before break-ing.
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Cc: Christian Marangi <[email protected]>
Cc: Rafał Miłecki <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions