slqb: add common slab debug bits
PATCH 1/1 slqb: add common slab debug bits
This is a simple copy&paste from slub.c:
- lockdep annotation
- might sleep annotation
- fault injection
CC Nick Piggin <[email protected]>
CC Christoph Lameter <[email protected]>
Signed-off-by Wu Fengguang <[email protected]>
--- mm/slqb.c | 7 +++++++ 1 file changed, 7 insertions(+)
mm/slqb.c +7 -0
@@ -19,6 +19,7 @@#include <linux/ctype.h> #include <linux/kallsyms.h> #include <linux/memory.h> +#include <linux/fault-inject.h> /* * TODO
@@ -1541,6 +1542,12 @@ static __always_inline void *slab_alloc( gfpflags &= gfp_allowed_mask; +lockdep_trace_alloc (gfpflags); +might_sleep_if (gfpflags & __GFP_WAIT); + +if (should_failslab (s->objsize, gfpflags)) +return NULL ; + again:local_irq_save (flags); object =__slab_alloc (s, gfpflags, node);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Pekka Enberg
AppliedQuoted 9 lines · Wu Fengguang
This is a simple copy&paste from
slub.c:- lockdep annotation
- might sleep annotation
- fault injectionCC Nick Piggin <[email protected]>CC Christoph Lameter <[email protected]>Signed-off-by Wu Fengguang <[email protected]>
Applied, thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>