* [PATCH 3/5] FS: btrfs, don't touch freed memory
@ 2009-06-29 16:01 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-06-29 16:01 UTC (permalink / raw)
To: chris.mason; +Cc: linux-btrfs, viro, linux-kernel, Jiri Slaby
worker memory is already freed on one fail path in btrfs_start_workers,
but is still dereferenced. Switch the dereference and kfree.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
fs/btrfs/async-thread.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index 7f88628..6e4f6c5 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -299,8 +299,8 @@ int btrfs_start_workers(struct btrfs_workers *workers, int num_workers)
"btrfs-%s-%d", workers->name,
workers->num_workers + i);
if (IS_ERR(worker->task)) {
- kfree(worker);
ret = PTR_ERR(worker->task);
+ kfree(worker);
goto fail;
}
--
1.6.3.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-29 16:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 16:01 [PATCH 3/5] FS: btrfs, don't touch freed memory Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®