]> git.hungrycats.org Git - linux/commit
[PATCH] s390: tlb flush race.
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:43:11 +0000 (18:43 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:43:11 +0000 (18:43 -0800)
commitf8e8784a619a95a2a795971550345822e2d1bdc4
treec51295d81d72017f85da484afa05d735a34fb73b
parent465235cb04483af8a145a2dc564c7440f7c03263
[PATCH] s390: tlb flush race.

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

I think I found a potential race in install_page/install_file_pte. The
inline function zap_pte releases pages by calling page_remove_rmap and
page_cache_release.  If this was the last user of a page it can get
purged from the page cache and then get immediatly reused. But there
might still be a tlb for this page on another cpu. The tlb is removed
in the callers of zap_pte, install_page and install_file_pte, but this
is too late. I admit that its a very unlikely race but never the less..

I fixed this by using the new ptep_clear_flush function that is introduced
with the tlb flush optimization patch for s/390.
mm/fremap.c