On Mon, 24 Sep 2007 11:44:35 +0400, Alexey Dobriyan said: > On 9/24/07, [email protected] <[email protected]> wrote: > > On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said: > > > > > -static inline void *kcalloc(size_t n, size_t size, gfp_t flags) > > > -{ > > > - if (n != 0 && size > ULONG_MAX / n) > > > - return NULL; > > > - return __kmalloc(n * size, flags | __GFP_ZERO); > > > -} > > > +void *kcalloc(size_t n, size_t size, gfp_t flags); > > > > NAK. > > > > This busticates some pretty subtle code in mm/slab.c that uses > > uses __builtin_return_address() for debugging > > Interesting. Here is output from kernel with patch applied and leak > plugged into proc_dointvec() (I checked twice): > > $ grep kcalloc /proc/slab_allocators Right. That was the whole *point* of the patch to inline kcalloc - otherwise you ended up with zillions of entries for kcalloc that didn't tell you where they came from. > $ grep proc_dointvec /proc/slab_allocators > size-64: 19 proc_dointvec+0x48/0xa0 A lot more useful, no? ;) <confoozled> I'm failing to see where proc_dointvec() ends up calling kcalloc? So I'm not sure what that's
Attachment:
pgpS8DyJL19s1.pgp
Description: PGP signature
- References:
- [PATCH] Uninline kcalloc()
- From: Alexey Dobriyan <[email protected]>
- Re: [PATCH] Uninline kcalloc()
- From: [email protected]
- Re: [PATCH] Uninline kcalloc()
- From: "Alexey Dobriyan" <[email protected]>
- [PATCH] Uninline kcalloc()
- Prev by Date: "cat /proc/20502/wchan" vs strace vs man page
- Next by Date: Re: [PATCH getrusage: return ru_maxrss
- Previous by thread: Re: [PATCH] Uninline kcalloc()
- Next by thread: Re: [PATCH] Uninline kcalloc()
- Index(es):