]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Fix potential race condition in _ma_insert
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 7 Jan 2019 19:45:10 +0000 (14:45 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:27:59 +0000 (12:27 -0500)
commit33f4e78ec339b9b571466cffacba3ffcb63cfbbd
treeaabe11d1a056a15e2e122d77f8e9559212297175
parent74f8cfb58a3a761c27e42aaac389a48fc251238e
maple_tree: Fix potential race condition in _ma_insert

The pivots protect readers from reading invalid data.  Without a wmb
between overwriting the end pivot (of zero), there is a potential that
the writes could be reordered and a race condition would exist between
updating both values and a reader interleaving those writes.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c