Skip to content

Commit

Permalink
s390/vdso: use correct memory barrier
Browse files Browse the repository at this point in the history
By definition smp_wmb only orders writes against writes. (Finish all
previous writes, and do not start any future write). To protect the
vdso init code against early reads on other CPUs, let's use a full
smp_mb at the end of vdso init. As right now smp_wmb is implemented
as full serialization, this needs no stable backport, but this change
will be necessary if we reimplement smp_wmb.

Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
borntraeger authored and Martin Schwidefsky committed Oct 14, 2015
1 parent e0af21c commit 33b5881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int __init vdso_init(void)

get_page(virt_to_page(vdso_data));

smp_wmb();
smp_mb();

return 0;
}
Expand Down

0 comments on commit 33b5881

Please sign in to comment.