On Wed, 2006-01-04 at 01:32 -0500, Josef Sipek wrote:
> Which is the prefered method of allocating memory __getname or kmalloc?
Depends entirely on the purpose. __getname uses the "names_cache" slab
and allocates PATH_MAX sized chunks. It is mainly supposed to be used
for temporary storage of an entire path.
> I looked at the source, and it appears to be used by 9p, smbfs, parts
> of VFS. In total there are only 10 calls to it.
Most callers use getname(), which also does the string length sanity
checks and then copies the path from userland memory.
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[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]