Skip to content

Commit

Permalink
Revert "kref: double kref_put() in my_data_handler()"
Browse files Browse the repository at this point in the history
This reverts commit 8f1ecc9.

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>
  • Loading branch information
Thomas Hellstrom authored and Greg Kroah-Hartman committed Apr 8, 2017
1 parent 35dbf4e commit fd0f50d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/kref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fd0f50d

Please sign in to comment.