Thread (6 messages) 6 messages, 2 authors, 2019-08-22

Re: [PATCH kernel v5 1/4] powerpc/powernv/ioda: Fix race in TCE level allocation

flat view

From: Michael Ellerman <hidden>
Date: 2019-08-22 13:08:58
Also in: stable

On Thu, 2019-07-18 at 05:11:36 UTC, Alexey Kardashevskiy wrote:
pnv_tce() returns a pointer to a TCE entry and originally a TCE table
would be pre-allocated. For the default case of 2GB window the table
needs only a single level and that is fine. However if more levels are
requested, it is possible to get a race when 2 threads want a pointer
to a TCE entry from the same page of TCEs.

This adds cmpxchg to handle the race. Note that once TCE is non-zero,
it cannot become zero again.

CC: stable@vger.kernel.org # v4.19+
Fixes: a68bd1267b72 ("powerpc/powernv/ioda: Allocate indirect TCE levels on demand")
Signed-off-by: Alexey Kardashevskiy <redacted>
Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/56090a3902c80c296e822d11acdb6a101b322c52

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help