lkml.org 
[lkml]   [2024]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCH 0/2] fix DT overlays when device links are released
    Date
    Link to RFC:
    * https://lore.kernel.org/lkml/20240123-fix-device-links-overlays-v1-1-9e4f6acaab6c@analog.com/

    Changes since RFC:
    * Use a dedicated workqueue to remove devlinks;
    * Flush the devlink workqueue before checking the of_node refcount
    value.

    The following series is the result of the discussion I had with Rafael.
    To sum up the fundamental issue, device links drop their refcounts
    asynchronously and that means that the of_node refcount associated with
    the device will also be dropped asynchronously. Now, in
    __of_changeset_entry_destroy(), the assumption is that the node refcount
    must be 1 and that cannot be guaranteed given the above.

    I'm pasting again the link of the first time I exposed the issue where
    one can see the resulps (big splat) of failing DT assumption:

    https://lore.kernel.org/linux-devicetree/20230511151047.1779841-1-nuno.sa@analog.com/

    ---
    Nuno Sa (2):
    driver: core: add dedicated workqueue for devlink removal
    of: dynamic: flush devlinks workqueue before destroying the changeset

    drivers/base/core.c | 33 +++++++++++++++++++++++++++++----
    drivers/of/dynamic.c | 8 ++++++++
    include/linux/fwnode.h | 1 +
    3 files changed, 38 insertions(+), 4 deletions(-)
    ---
    base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
    change-id: 20240123-fix-device-links-overlays-5422e033a09b
    --

    Thanks!
    - Nuno Sá


    \
     
     \ /
      Last update: 2024-05-27 14:46    [W:4.108 / U:0.896 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site