From: Li Zefan <lizf@cn.fujitsu.com>
To: diegocg@gmail.com
Cc: Chris Mason <chris.mason@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix memory leak in btrfs_defrag_file
Date: Fri, 02 Sep 2011 09:46:59 +0800 [thread overview]
Message-ID: <4E603593.4060503@cn.fujitsu.com> (raw)
In-Reply-To: <201109011633.57877.diegocg@gmail.com>
Diego Calleja wrote:
> kmemleak found this:
> unreferenced object 0xffff8801b64af968 (size 512):
> comm "btrfs-cleaner", pid 3317, jiffies 4306810886 (age 903.272s)
> hex dump (first 32 bytes):
> 00 82 01 07 00 ea ff ff c0 83 01 07 00 ea ff ff ................
> 80 82 01 07 00 ea ff ff c0 87 01 07 00 ea ff ff ................
> backtrace:
> [<ffffffff816875cc>] kmemleak_alloc+0x5c/0xc0
> [<ffffffff8114aec3>] kmem_cache_alloc_trace+0x163/0x240
> [<ffffffff8127a290>] btrfs_defrag_file+0xf0/0xb20
> [<ffffffff8125d9a5>] btrfs_run_defrag_inodes+0x165/0x210
> [<ffffffff812479d7>] cleaner_kthread+0x177/0x190
> [<ffffffff81075c7d>] kthread+0x8d/0xa0
> [<ffffffff816af5f4>] kernel_thread_helper+0x4/0x10
> [<ffffffffffffffff>] 0xffffffffffffffff
>
> "pages" is not always freed. Fix it removing the unnecesary additional return.
>
> Signed-off-by: Diego Calleja <diegocg@gmail.com>
>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
next prev parent reply other threads:[~2011-09-02 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 14:33 [PATCH] btrfs: fix memory leak in btrfs_defrag_file Diego Calleja
2011-09-02 1:46 ` Li Zefan [this message]
2011-09-22 10:36 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E603593.4060503@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=chris.mason@oracle.com \
--cc=diegocg@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox