From: Catalin Marinas <catalin.marinas@arm.com>
To: Li Zefan <lizefan@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH v3 2/4] kmemleak: allow freeing internal objects after kmemleak was disabled
Date: Fri, 28 Mar 2014 10:13:15 +0000 [thread overview]
Message-ID: <20140328101315.GB21330@arm.com> (raw)
In-Reply-To: <5335387E.2050005@huawei.com>
More nitpicks ;)
On Fri, Mar 28, 2014 at 08:53:18AM +0000, Li Zefan wrote:
> diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
> index 6dc8013..a7e6a06 100644
> --- a/Documentation/kmemleak.txt
> +++ b/Documentation/kmemleak.txt
> @@ -51,7 +51,8 @@ Memory scanning parameters can be modified at run-time by writing to the
> (default 600, 0 to stop the automatic scanning)
> scan - trigger a memory scan
> clear - clear list of current memory leak suspects, done by
> - marking all current reported unreferenced objects grey
> + marking all current reported unreferenced objects grey.
> + Or free all kmemleak objects if kmemleak has been disabled.
Comma after "unreferenced objects grey" and lower-case "or free ..."
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index be7ecc0..6631df8 100644
[...]
> @@ -1690,17 +1711,16 @@ static const struct file_operations kmemleak_fops = {
> */
> static void kmemleak_do_cleanup(struct work_struct *work)
> {
> - struct kmemleak_object *object;
> -
> mutex_lock(&scan_mutex);
> stop_scan_thread();
>
> - if (!kmemleak_has_leaks) {
> - rcu_read_lock();
> - list_for_each_entry_rcu(object, &object_list, object_list)
> - delete_object_full(object->pointer);
> - rcu_read_unlock();
> - }
> + if (!kmemleak_has_leaks)
> + __kmemleak_do_cleanup();
> + else
> + pr_info("Disable kmemleak without freeing internal objects, "
> + "so you may still check information on memory leaks. "
> + "You may reclaim memory by writing \"clear\" to "
> + "/sys/kernel/debug/kmemleak\n");
Alternative text:
pr_info("Kmemleak disabled without freeing internal data. "
"Reclaim the memory with \"echo clear > /sys/kernel/debug/kmemleak\"\n");
(I'm wouldn't bother with long lines in printk strings)
Otherwise:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-03-28 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 8:52 [PATCH v3 1/4] kmemleak: free internal objects only if there're no leaks to be reported Li Zefan
2014-03-28 8:53 ` [PATCH v3 2/4] kmemleak: allow freeing internal objects after kmemleak was disabled Li Zefan
2014-03-28 10:13 ` Catalin Marinas [this message]
2014-03-28 10:22 ` Li Zefan
2014-03-28 8:53 ` [PATCH v3 3/4] kmemleak: remove redundant code Li Zefan
2014-03-28 8:53 ` [PATCH v3 4/4] kmemleak: change some global variables to int Li Zefan
2014-03-28 10:04 ` [PATCH v3 1/4] kmemleak: free internal objects only if there're no leaks to be reported Catalin Marinas
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=20140328101315.GB21330@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).