Skip to contentSkip to conversation

fault-injection capability for kmalloc. [bug fix]

PATCH Don Mullis 1 participant 1 message Sep 6, 2006 Memory management

lore
Share & tools
lore

Don Mullis

author
#0 lore raw

Fix compilation when CONFIG_FAILSLAB=n .

---
 mm/slab.c |    2 ++
 1 file changed, 2 insertions(+)
mm/slab.c +2 -0
Index: linux-2.6.17/mm/slab.c
===================================================================
@@ -2985,9 +2985,11 @@ static inline void *____cache_alloc(stru
 	void *objp;
 	struct array_cache *ac;
 
+#ifdef CONFIG_FAILSLAB
 	if (!(flags & __GFP_NOFAIL) && cachep != &cache_cache &&
 	    should_fail(failslab, obj_size(cachep)))
 		return NULL;
+#endif
 
 #ifdef CONFIG_NUMA
 	if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) {