linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix memory ordering bug in mm/vmalloc.c.
@ 2014-12-01  8:11 Dmitry Vyukov
  2014-12-02  4:22 ` Joonsoo Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Vyukov @ 2014-12-01  8:11 UTC (permalink / raw)
  To: akpm; +Cc: Dmitry Vyukov, edumazet, js1304, iamjoonsoo.kim, linux-mm

Read memory barriers must follow the read operations.

Cc: edumazet@google.com
Cc: js1304@gmail.com
Cc: iamjoonsoo.kim@lge.com
Cc: akpm@linux-foundation.org
Cc: linux-mm@kvack.org

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 90520af..e052a34 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2575,10 +2575,10 @@ static void show_numa_info(struct seq_file *m, struct vm_struct *v)
 		if (!counters)
 			return;
 
-		/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */
-		smp_rmb();
 		if (v->flags & VM_UNINITIALIZED)
 			return;
+		/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */
+		smp_rmb();
 
 		memset(counters, 0, nr_node_ids * sizeof(unsigned int));
 
-- 
2.2.0.rc0.207.ga3a616c

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2014-12-02  4:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-01  8:11 [PATCH] Fix memory ordering bug in mm/vmalloc.c Dmitry Vyukov
2014-12-02  4:22 ` Joonsoo Kim

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