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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 6 Mar 2017 08:19:27 +0100
From:   Thomas Hellstrom <thellstrom@...are.com>
To:     <greg@...ah.com>
CC:     <linux-kernel@...r.kernel.org>,
        Thomas Hellstrom <thellstrom@...are.com>,
        Roel Kluin <roel.kluin@...il.com>,
        Randy Dunlap <randy.dunlap@...cle.com>,
        KrishnamRaju raju <ekraju@...il.com>
Subject: [PATCH] Revert "kref: double kref_put() in my_data_handler()"

This reverts commit 8f1ecc9fbc5b223e4f5d5bb8bcd6f5672c4bc4b6.

The correction is incorrect, see discussion at

http://stackoverflow.com/questions/20093127/why-kref-doc-of-linux-kernel-omits-kref-put-when-kthread-run-fail

Reported-by: KrishnamRaju raju <ekraju@...il.com>
Cc: Roel Kluin <roel.kluin@...il.com>
Cc: Randy Dunlap <randy.dunlap@...cle.com>
Cc: KrishnamRaju raju <ekraju@...il.com>
Signed-off-by: Thomas Hellstrom <thellstrom@...are.com>
---
 Documentation/kref.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/kref.txt b/Documentation/kref.txt
index ddf85a5..d26a27c 100644
--- a/Documentation/kref.txt
+++ b/Documentation/kref.txt
@@ -84,6 +84,7 @@ int my_data_handler(void)
 	task = kthread_run(more_data_handling, data, "more_data_handling");
 	if (task == ERR_PTR(-ENOMEM)) {
 		rv = -ENOMEM;
+	        kref_put(&data->refcount, data_release);
 		goto out;
 	}
 
-- 
2.4.11

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ