Re: [PATCH] include/linux/slab.h: new KFREE() macro.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 08 Jan 2007 01:06:12 PST, Amit Choudhary said:
> I do not see how a double free can result in _logical_wrong_behaviour_ of the program and the
> program keeps on running (like an incoming packet being dropped because of double free). Double
> free will _only_and_only_ result in system crash that can be solved by setting 'x' to NULL.

The problem is that very rarely is there a second free() with no intervening
use - what actually *happens* usually is:

1) You alloc the memory
2) You use the memory
3) You take a reference on the memory, so you know where it is.
4) You free the memory
5) You use the memory via the reference you took in (3)
6) You free it again - at which point you finally know for sure that
everything in step 5 was doing a fandango on core....

Attachment: pgpL55wpI73WA.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux