From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Catalin Marinas <catalin.marinas@arm•com>
Cc: linux-next@vger•kernel.org, Pekka Enberg <penberg@cs•helsinki.fi>,
Vegard Nossum <vegard.nossum@gmail•com>,
Ingo Molnar <mingo@elte•hu>
Subject: linux-next: manual merge of the kmemleak tree
Date: Thu, 15 Jan 2009 16:27:08 +1100 [thread overview]
Message-ID: <20090115162708.74cd1428.sfr@canb.auug.org.au> (raw)
Hi Catalin,
Today's linux-next merge of the kmemleak tree got a conflict in mm/slab.c
between commit 30532cb3c49a2a9fed94127aab26003c52398a51 ("slab: add hooks
for kmemcheck") from the kmemcheck tree and commit
26e73e5a681dc8268bd3fbcb3c26f4ac9fdc8433 ("kmemleak: Add the slab memory
allocation/freeing hooks") from the kmemleak tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc mm/slab.c
index dffbac3,8e7c952..0000000
--- a/mm/slab.c
+++ b/mm/slab.c
@@@ -179,13 -178,13 +180,13 @@@
SLAB_STORE_USER | \
SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \
SLAB_DESTROY_BY_RCU | SLAB_MEM_SPREAD | \
- SLAB_DEBUG_OBJECTS | SLAB_NOTRACK)
- SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE)
++ SLAB_DEBUG_OBJECTS | SLAB_NOTRACK | SLAB_NOLEAKTRACE)
#else
# define CREATE_MASK (SLAB_HWCACHE_ALIGN | \
SLAB_CACHE_DMA | \
SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \
SLAB_DESTROY_BY_RCU | SLAB_MEM_SPREAD | \
- SLAB_DEBUG_OBJECTS | SLAB_NOTRACK)
- SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE)
++ SLAB_DEBUG_OBJECTS | SLAB_NOTRACK | SLAB_NOLEAKTRACE)
#endif
/*
@@@ -3285,10 -3372,9 +3308,12 @@@ __cache_alloc_node(struct kmem_cache *c
out:
local_irq_restore(save_flags);
ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller);
+ kmemleak_alloc_recursive(ptr, obj_size(cachep), 1, cachep->flags,
+ flags);
+ if (likely(ptr))
+ kmemcheck_slab_alloc(cachep, flags, ptr, obj_size(cachep));
+
if (unlikely((flags & __GFP_ZERO) && ptr))
memset(ptr, 0, obj_size(cachep));
@@@ -3341,11 -3427,10 +3366,13 @@@ __cache_alloc(struct kmem_cache *cachep
objp = __do_cache_alloc(cachep, flags);
local_irq_restore(save_flags);
objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller);
+ kmemleak_alloc_recursive(objp, obj_size(cachep), 1, cachep->flags,
+ flags);
prefetchw(objp);
+ if (likely(objp))
+ kmemcheck_slab_alloc(cachep, flags, objp, obj_size(cachep));
+
if (unlikely((flags & __GFP_ZERO) && objp))
memset(objp, 0, obj_size(cachep));
@@@ -3459,10 -3544,9 +3486,11 @@@ static inline void __cache_free(struct
struct array_cache *ac = cpu_cache_get(cachep);
check_irq_off();
+ kmemleak_free_recursive(objp, cachep->flags);
objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
+ kmemcheck_slab_free(cachep, objp, obj_size(cachep));
+
/*
* Skip calling cache_free_alien() when the platform is not numa.
* This will avoid cache misses that happen while accessing slabp (which
next reply other threads:[~2009-01-15 5:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 5:27 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-01-19 5:16 linux-next: manual merge of the kmemleak tree Stephen Rothwell
2009-01-15 5:27 Stephen Rothwell
2009-01-15 10:29 ` Eduard - Gabriel Munteanu
2009-01-15 10:38 ` Ingo Molnar
2009-01-15 12:04 ` Catalin Marinas
2009-01-15 12:27 ` Ingo Molnar
2009-01-15 17:49 ` Eduard - Gabriel Munteanu
2009-04-21 11:14 ` Catalin Marinas
2009-04-21 11:47 ` Catalin Marinas
2009-04-21 18:02 ` Pekka Enberg
2009-01-15 5:27 Stephen Rothwell
2009-01-15 5:27 Stephen Rothwell
2009-01-15 5:26 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090115162708.74cd1428.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=catalin.marinas@arm$(echo .)com \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mingo@elte$(echo .)hu \
--cc=penberg@cs$(echo .)helsinki.fi \
--cc=vegard.nossum@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox