summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-12-12 16:56:30 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 12:42:49 -0800
commit7e5b528b4ce31208ef5c240c14beec4853d8262c (patch)
treed42f428802ade412a8c3c6ec5271a9e29c68c806 /mm
parent6a2d5679b4a852a3bf80c570644456ab466ab714 (diff)
downloadlwn-7e5b528b4ce31208ef5c240c14beec4853d8262c.tar.gz
lwn-7e5b528b4ce31208ef5c240c14beec4853d8262c.zip
mm/vmalloc.c: fix memory ordering bug
Read memory barriers must follow the read operations. Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Cc: Eric Dumazet <edumazet@google.com> Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 8a18196fcdff..39c338896416 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2574,10 +2574,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));