Smital Desai | 1 Feb 01:01
Favicon

Query regarding Kmemleak

Hello ,

         I am  just trying to understand Kmemleak support.

         In a test program ,  allocating some memory using and vmalloc () and freeing it in exit () routine.
         But when i run a kmemleak , It reports this as a leak.

         But isn't it a generic reuirement to allocate something for the lifetime of the module and free when we
remove the module. ?   Can somebody explain ?

         I have provided the kmemleak output and my test program below.

Thanks,
Smital Desai

=================================================================================

cat  /sys/kernel/debug/memleak

unreferenced object 0xe1b18000 (size 512):
  comm "insmod", pid 1066, jiffies 4294953148 (age 54.630s)
  hex dump (first 32 bytes):
    36 1c 00 00 02 16 00 00 3c 1c 00 00 02 16 00 00  6.......<.......
    43 1c 00 00 02 16 00 00 4f 1c 00 00 02 16 00 00  C.......O.......
  backtrace:
    [<c0234ecc>] __vmalloc_node_range+0x1a8/0x1d0
    [<c0234f2c>] __vmalloc_node+0x38/0x44
    [<c023507c>] vmalloc+0x28/0x30
    [<bf00200c>] 0xbf00200c
    [<c0100458>] do_one_initcall+0x94/0x164
(Continue reading)

Jeff Haran | 1 Feb 01:30
Favicon

RE: Query regarding Kmemleak

> -----Original Message-----
> From: kernelnewbies-bounces <at> kernelnewbies.org [mailto:kernelnewbies-
> bounces <at> kernelnewbies.org] On Behalf Of Smital Desai
> Sent: Tuesday, January 31, 2012 4:02 PM
> To: Kernel Newbies
> Subject: Query regarding Kmemleak
> 
> Hello ,
> 
>          I am  just trying to understand Kmemleak support.
> 
>          In a test program ,  allocating some memory using and vmalloc
() and
> freeing it in exit () routine.
>          But when i run a kmemleak , It reports this as a leak.
> 
>          But isn't it a generic reuirement to allocate something for
the lifetime of
> the module and free when we remove the module. ?   Can somebody
> explain ?
> 
>          I have provided the kmemleak output and my test program
below.
> 
> Thanks,
> Smital Desai
> 
> 
> ==========================================================
> =======================
(Continue reading)

Smital Desai | 1 Feb 02:47
Favicon

RE: Query regarding Kmemleak

________________________________________
From: Jeff Haran [jharan <at> bytemobile.com]
Sent: Wednesday, February 01, 2012 6:00 AM
To: Smital Desai; Kernel Newbies
Subject: RE: Query regarding Kmemleak

> -----Original Message-----
> From: kernelnewbies-bounces <at> kernelnewbies.org [mailto:kernelnewbies-
> bounces <at> kernelnewbies.org] On Behalf Of Smital Desai
> Sent: Tuesday, January 31, 2012 4:02 PM
> To: Kernel Newbies
> Subject: Query regarding Kmemleak
>
> Hello ,
>
>          I am  just trying to understand Kmemleak support.
>
>          In a test program ,  allocating some memory using and vmalloc
() and
> freeing it in exit () routine.
>          But when i run a kmemleak , It reports this as a leak.
>
>          But isn't it a generic reuirement to allocate something for
the lifetime of
> the module and free when we remove the module. ?   Can somebody
> explain ?
>
>          I have provided the kmemleak output and my test program
below.
>
(Continue reading)

Jeff Haran | 1 Feb 03:06
Favicon

RE: Query regarding Kmemleak

> -----Original Message-----
> From: Smital Desai [mailto:Smital.Desai <at> lntinfotech.com]
> Sent: Tuesday, January 31, 2012 5:47 PM
> To: Jeff Haran; Kernel Newbies
> Subject: RE: Query regarding Kmemleak
> 
> ________________________________________
> From: Jeff Haran [jharan <at> bytemobile.com]
> Sent: Wednesday, February 01, 2012 6:00 AM
> To: Smital Desai; Kernel Newbies
> Subject: RE: Query regarding Kmemleak
> 
> > -----Original Message-----
> > From: kernelnewbies-bounces <at> kernelnewbies.org
> [mailto:kernelnewbies-
> > bounces <at> kernelnewbies.org] On Behalf Of Smital Desai
> > Sent: Tuesday, January 31, 2012 4:02 PM
> > To: Kernel Newbies
> > Subject: Query regarding Kmemleak
> >
> > Hello ,
> >
> >          I am  just trying to understand Kmemleak support.
> >
> >          In a test program ,  allocating some memory using and
vmalloc
> () and
> > freeing it in exit () routine.
> >          But when i run a kmemleak , It reports this as a leak.
> >
(Continue reading)

amit mehta | 1 Feb 06:21
Picon

Re: Need help: Generating patch using git

> Just a couple of thoughts, Amit - you seem to have your kernel tree in
> /root and be doing everything as root, are you sure you want to do it
> this way rather than in $HOME as your normal user account?

I've access to this machine as root also but as you've suggested I can use my
user login account as well.

> Also the kernel tree you are using seems to be Linus's mainline, is
> that what you wanted or did you want to be making the patch against a
> linux-next kernel?

My current goal is to send some patches to kernel janitor group though I'm not
sure if this group is still active or not.
you mean to say that this is not the tree which i should be synced to? If not
then can you please send me the link to the relevant git repository ?

-Amit
Favicon

Working with kernel_accept?

I was trying to create socket within kernel and I used kernel_* helper functions to get started. This worked
fine for UDP however with TCP I ran into some issues when I did the following steps

1.) I was able to create a listening TCP socket using sock_create_kern, should I be using sock_create only?

2.) I had changed the sk_data_ready callback for the listening socket so that a waiting thread would be
notified when a connection is ready to be accepted. When that happened the thread was woken up and that
thread then called kernel_accept.

3.) Now started the issue, in kernel_accept it uses sock_create_lite and the machine just froze. After
quite a lot of hours, i was able to figure out the problem which was apparently with sock_create_lite. This
function was not initializing sock->sk, printed it and found it to be NULL, which I guess caused the
machine to froze.

4.) As a resolve, I went back to sock_create_kern and called sock->ops->accept instead of kernel_accept
and it worked.

Is there any other step required in order to work with kernel_accept?
I'm using SLES 11 SP1, kernel 2.6.32.12

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named
recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions
presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or
publication of
(Continue reading)

Mulyadi Santosa | 1 Feb 16:03
Picon

Re: Best way to debug an Intel Core i5 hang - likely graphics (possibly power) related

Hi Graeme :)

On Wed, Feb 1, 2012 at 05:06, Graeme Russ <graeme.russ <at> gmail.com> wrote:
> Alas, after 36 hours it froze again - tweaking the SDRAM voltage up and
> down didn't resolve the problem.

Bugger....heat maybe?

> I recompiled with the various sensor bus options as modules and got it
> working

Sounds good. BTW, which kernel version do you use now?

--

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Mulyadi Santosa | 1 Feb 16:12
Picon

Re: Some question about "security context of a task"

Hi....

On Wed, Feb 1, 2012 at 14:12, loody <miloody <at> gmail.com> wrote:
> below is the place it happen
>
> if (atomic_read(&p->real_cred->user->processes) >=
>             p->signal->rlim[RLIMIT_NPROC].rlim_cur) {

Seems like a normal user limit checking...the one we usually set via
"ulimit" command. Checking number of processes to be precise...

> after checking the parameter, I found p->real_cred->user is NULL.

hm, IMHO if it exceeds ulimit, the process creation should just stop.
Not sure why read_cred->user becomes NULL. Maybe that's for clean up,
since later process will be terminated?

--

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Graeme Russ | 1 Feb 16:28
Picon

Re: Best way to debug an Intel Core i5 hang - likely graphics (possibly power) related


On Feb 2, 2012 2:04 AM, "Mulyadi Santosa" <mulyadi.santosa <at> gmail.com> wrote:
>
> Hi Graeme :)
>
> On Wed, Feb 1, 2012 at 05:06, Graeme Russ <graeme.russ <at> gmail.com> wrote:
> > Alas, after 36 hours it froze again - tweaking the SDRAM voltage up and
> > down didn't resolve the problem.
>
> Bugger....heat maybe?

I suspect possibly flakey cap in one of the voltage regulators

>
> > I recompiled with the various sensor bus options as modules and got it
> > working
>
> Sounds good. BTW, which kernel version do you use now?

3.3.0+ (top of Linus' tree from a few days ago)

Regards,

Graeme

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies <at> kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Mulyadi Santosa | 1 Feb 16:34
Picon

Re: Best way to debug an Intel Core i5 hang - likely graphics (possibly power) related

Hi again :)

On Wed, Feb 1, 2012 at 22:28, Graeme Russ <graeme.russ <at> gmail.com> wrote:
> I suspect possibly flakey cap in one of the voltage regulators

if that's true, that's really nasty. And I think that also means that
motherboard is pretty unusable for long usage period.

Is it possible to just trade your motherboard with new one?

> 3.3.0+ (top of Linus' tree from a few days ago)

Somehow, IMHO, 2.6.x series is still better for stability. After
looking at kernel.org, I think you can test with 2.6.32.55.

--

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

Gmane