lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c320424-fb25-1c4a-3d52-5d381c7b2884@web.de>
Date:   Mon, 25 May 2020 12:01:59 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Zhang Qiang <qiang.zhang@...driver.com>, Tejun Heo <tj@...nel.org>,
        Lai Jiangshan <jiangshanlai@...il.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v3] workqueue: Fix double kfree for rescuer

> The callback function "rcu_free_wq" could be called after memory
> was released for "rescuer" already, Thus delete a misplaced call
> of the function "kfree".

I got into the mood to follow your interpretation of the
software situation for a moment.

I have taken another look also at the implementation of the function “destroy_workqueue”.

* The function call “kfree(rescuer)” 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.
I'm sorry for undesirable confusion because of this patch review.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ