diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2017-03-06 02:19:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-08 12:38:10 -0400 |
commit | fd0f50db2eb72555ef8f70af14c1e3ee2079b32c (patch) | |
tree | 12d91d68f5ad378b5fca11f105058534171a9d48 | |
parent | 35dbf4efb044fbe4096a5edbb449e894aca9ef50 (diff) |
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@gmail.com>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: KrishnamRaju raju <ekraju@gmail.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/kref.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/kref.txt b/Documentation/kref.txt index ddf85a5dde0c..d26a27ca964d 100644 --- a/Documentation/kref.txt +++ b/Documentation/kref.txt | |||
@@ -84,6 +84,7 @@ int my_data_handler(void) | |||
84 | task = kthread_run(more_data_handling, data, "more_data_handling"); | 84 | task = kthread_run(more_data_handling, data, "more_data_handling"); |
85 | if (task == ERR_PTR(-ENOMEM)) { | 85 | if (task == ERR_PTR(-ENOMEM)) { |
86 | rv = -ENOMEM; | 86 | rv = -ENOMEM; |
87 | kref_put(&data->refcount, data_release); | ||
87 | goto out; | 88 | goto out; |
88 | } | 89 | } |
89 | 90 | ||