diff options
author | Heikki Krogerus <[email protected]> | 2021-06-23 16:14:21 +0300 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2021-06-23 19:34:58 +0200 |
commit | 5dca69e26fe97f17d4a6cbd6872103c868577b14 (patch) | |
tree | e6638b0f32b8b2ab911010141e923ab7349ef43c /scripts/gdb/linux/cpus.py | |
parent | 13311e74253fe64329390df80bed3f07314ddd61 (diff) |
software node: Handle software node injection to an existing device properly
The function software_node_notify() - the function that creates
and removes the symlinks between the node and the device - was
called unconditionally in device_add_software_node() and
device_remove_software_node(), but it needs to be called in
those functions only in the special case where the node is
added to a device that has already been registered.
This fixes NULL pointer dereference that happens if
device_remove_software_node() is used with device that was
never registered.
Fixes: b622b24519f5 ("software node: Allow node addition to already existing device")
Reported-and-tested-by: Dominik Brodowski <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Heikki Krogerus <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/cpus.py')
0 files changed, 0 insertions, 0 deletions