Hi...

On Wed, Dec 1, 2010 at 15:17, naveen yadav <[email protected]> wrote:
> Hi all,
>
> I Have following question with regard for 2.6.30 kernel
>
>  If we do double kfree()
>
> a) Then what will happen?

if we check the code here: (assuming it's using SLOB)
http://lxr.linux.no/linux+v2.6.36/mm/slob.c#L519

then I assume it simply detects that it is already freed and returns
immediately.

> b) Can kernel detect double kfree() ?

not sure, but I saw a call to kmemleak facility close to the line I
mentioned above...likely it could detect double [k]free()


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

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

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to