lkml.org 
[lkml]   [2020]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2] workqueue: Fix double kfree for rescuer
    From
    Date
    > The duplicate memory release should be deleted from the implementation
    > of the callback function "rcu_free_wq".

    I tried to help with the selection of a better commit message.
    I have taken another look also at the implementation of the function “destroy_workqueue”.

    * The function call “destroy_workqueue” can be performed there in an if branch
    after the statement “wq->rescuer = NULL” was executed.

    * This data processing is independent from a possible call of the
    function “call_rcu(&wq->rcu, rcu_free_wq)” in another if branch.
    Thus it seems that a null pointer is intentionally passed by a data structure
    member to this callback function on demand.
    The corresponding call of the function “kfree” can tolerate this special case.


    Now I find that the proposed change can be inappropriate.

    Regards,
    Markus

    \
     
     \ /
      Last update: 2020-05-25 11:51    [W:2.389 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site