diff options
author | Will Deacon <[email protected]> | 2013-02-28 17:47:20 +0100 |
---|---|---|
committer | Russell King <[email protected]> | 2013-03-03 22:54:13 +0000 |
commit | 37f47e3d62533c931b04cb409f2eb299e6342331 (patch) | |
tree | 346daa43b9edd75249d72a61c429a62cf662da4b /lib/debugobjects.c | |
parent | d61947a164760ac520cb416768afdf38c33d60e7 (diff) |
ARM: 7658/1: mm: fix race updating mm->context.id on ASID rollover
If a thread triggers an ASID rollover, other threads of the same process
must be made to wait until the mm->context.id for the shared mm_struct
has been updated to new generation and associated book-keeping (e.g.
TLB invalidation) has ben performed.
However, there is a *tiny* window where both mm->context.id and the
relevant active_asids entry are updated to the new generation, but the
TLB flush has not been performed, which could allow another thread to
return to userspace with a dirty TLB, potentially leading to data
corruption. In reality this will never occur because one CPU would need
to perform a context-switch in the time it takes another to do a couple
of atomic test/set operations but we should plug the race anyway.
This patch moves the active_asids update until after the potential TLB
flush on context-switch.
Cc: <[email protected]> # 3.8
Reviewed-by: Catalin Marinas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Russell King <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions