[PATCH][RT] Dereference pointer to cpu id, not to address of CPUID

From: Sven-Thorsten Dietrich
Date: Fri Nov 07 2008 - 16:13:44 EST


This patch applies to 2.6.25-rt, 2.6.26-rt and 2.6.27-rt


From: Sven-Thorsten Dietrich <sdietrich@xxxxxxx>
Subject: Dereference pointer to cpu id, when evaluating condition.

Without dereferencing, the condition always evaluates to true.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@xxxxxxx>
---
mm/slab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2033,7 +2033,7 @@ slab_destroy(struct kmem_cache *cachep,
} else {
kmem_freepages(cachep, addr);
if (OFF_SLAB(cachep)) {
- if (this_cpu)
+ if (*this_cpu)
__cache_free(cachep->slabp_cache, slabp, this_cpu);
else
kmem_cache_free(cachep->slabp_cache, slabp);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/