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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux