[Devel] [PATCH v2] tcache: Close race between tcache_invalidate_node() and tcache_attach_page()
Andrey Ryabinin
aryabinin at virtuozzo.com
Thu Jan 18 19:16:38 MSK 2018
On 01/15/2018 09:08 PM, Kirill Tkhai wrote:
> tcache_attach_page() tcache_invalidate_node()
> .. __tcache_lookup_node()
> .. __tcache_delete_node()
> Check node->invalidated ..
> tcache_page_tree_insert() ..
> tcache_lru_add() ..
> .. tcache_invalidate_node_pages()
> .. node->invalidated = true
>
> Check nr_page to determ if there is a race and repeat
> node pages iterations if so.
>
> v2: Move invalidate assignment down in tcache_invalidate_node_tree().
> synchronize_sched() to be sure all tcache_attach_page() see invalidated.
>
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Acked-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
More information about the Devel
mailing list