projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab78c84
)
Btrfs: async-thread: fix possible memory leak
author
Li Zefan
<lizf@cn.fujitsu.com>
Wed, 30 Jul 2008 13:24:37 +0000
(09:24 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:05 +0000
(11:04 -0400)
When kthread_run() returns failure, this worker hasn't been
added to the list, so btrfs_stop_workers() won't free it.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/async-thread.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/async-thread.c
b/fs/btrfs/async-thread.c
index 8d4cc4679d51ca8471f0086416aecc0474e3cd65..5fe6a0d532ed46a353b663ce4a13692313522399 100644
(file)
--- a/
fs/btrfs/async-thread.c
+++ b/
fs/btrfs/async-thread.c
@@
-187,6
+187,7
@@
int btrfs_start_workers(struct btrfs_workers *workers, int num_workers)
worker->task = kthread_run(worker_loop, worker, "btrfs");
worker->workers = workers;
if (IS_ERR(worker->task)) {
+ kfree(worker);
ret = PTR_ERR(worker->task);
goto fail;
}