mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
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 <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>
This commit is contained in:
parent
35dbf4efb0
commit
fd0f50db2e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user