Revert "kref: double kref_put() in my_data_handler()"

This reverts commit 8f1ecc9fbc.

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 <[email protected]>
Cc: Roel Kluin <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: KrishnamRaju raju <[email protected]>
Signed-off-by: Thomas Hellstrom <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Thomas Hellstrom 2017-03-06 08:19:27 +01:00 • committed by Greg Kroah-Hartman
commit fd0f50db2e

View file

@ -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;
}