From: ttlxzz ccc <boyzccc@gmail.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 答复: problem with kmemleak
Date: Thu, 12 May 2011 20:01:21 +0800 [thread overview]
Message-ID: <BANLkTim7d-szCHm1F2Hndiraa0u5795tbg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=wg=RgyEWzL9_fwUymhFDaccQCfw@mail.gmail.com>
Hi, Daniel:
I remove the module and didn't happen any exception. and U can see
that memory leak of insmod has been found int the kmemleak log. So I
think it doesn't happen in the rmmod.
Do you have other ideas, please?
thank you~~:)
On Thu, May 12, 2011 at 7:16 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> On Thu, May 12, 2011 at 12:59 PM, chenxi <chenxi05@baidu.com> wrote:
>> Thx, Maxin :)
>> ok
>> I did steps below:
>> 1 make oldconfig
>> 2 vim .config
>> ...
>> CONFIG_DEBUG_FS = y
>> CONFIG_DEBUG_KMEMLEAK = y
>> CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE = 1200
>> ...
>> 3 make ; make modules ; and replace the kernel; reboot
>> 4 mount -t debugfs debugfs /sys/kernel/debug
>> 4 I wrote a module like this
>> #include <linux/init.h>
>> #include <linux/module.h>
>> #include <linux/kernel.h>
>> #include <linux/vmalloc.h>
>>
>> void myfunc(void)
>> {
>> char *ptr;
>> ptr = vmalloc(512);
>> ptr = vmalloc(512);
>> ptr = vmalloc(512);
>> }
>>
>> int hello_init(void)
>> {
>> printk(KERN_ALERT "Hello World");
>> myfunc();
>> return 0;
>> }
>>
>> static void hello_exit(void)
>> {
>> printk(KERN_ALERT "Goodbye World");
>> }
>>
>> module_init(hello_init);
>> module_exit(hello_exit);
>>
>> MODULE_LICENSE("GPL v2");
>>
>> 5 clear the kmemleak
>> Echo clear > /sys/kernel/debug/kmemleak
>> 6 insmod the module
>> Insmod xxx.ko
>
> Can you please remove your module?
> I think the memory is leaked at unload time.
>
> thanks,
> Daniel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2011-05-12 12:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 2:06 problem with kmemleak ttlxzz ccc
2011-05-12 3:13 ` ttlxzz ccc
2011-05-12 9:44 ` Maxin B John
2011-05-12 9:59 ` 答复: " chenxi
2011-05-12 11:16 ` Daniel Baluta
2011-05-12 12:01 ` ttlxzz ccc [this message]
2011-05-12 14:18 ` Américo Wang
2011-05-12 14:33 ` ttlxzz ccc
2011-05-12 14:49 ` Américo Wang
2011-05-12 15:00 ` Daniel Baluta
2011-05-12 15:04 ` Catalin Marinas
2011-05-12 15:09 ` ttlxzz ccc
[not found] ` <BANLkTik6c8-g8FrXZy8-V35W6-Th++5p_A@mail.gmail.com>
2011-05-13 9:32 ` ttlxzz ccc
2011-05-13 14:08 ` Catalin Marinas
2011-05-15 6:01 ` ttlxzz ccc
2011-05-16 7:18 ` ttlxzz ccc
2011-05-16 8:53 ` Catalin Marinas
2011-05-16 8:58 ` Américo Wang
2011-05-12 10:04 ` ttlxzz ccc
2011-05-12 13:52 ` ttlxzz ccc
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=BANLkTim7d-szCHm1F2Hndiraa0u5795tbg@mail.gmail.com \
--to=boyzccc@gmail.com \
--cc=daniel.baluta@gmail.com \
--cc=linux-kernel@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