The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH][RT] Dereference pointer to cpu id, not to address of CPUID
@ 2008-11-07 21:13 Sven-Thorsten Dietrich
  2008-11-09 10:20 ` Juergen Beisert
  0 siblings, 1 reply; 3+ messages in thread
From: Sven-Thorsten Dietrich @ 2008-11-07 21:13 UTC (permalink / raw)
  To: RT Users List; +Cc: LKML, Tony Jones

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


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

Without dereferencing, the condition always evaluates to true.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@suse.de>
---
 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);



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-09 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-07 21:13 [PATCH][RT] Dereference pointer to cpu id, not to address of CPUID Sven-Thorsten Dietrich
2008-11-09 10:20 ` Juergen Beisert
2008-11-09 11:10   ` Sven-Thorsten Dietrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox