Skip to content
Snippets Groups Projects
Commit b38f6c50 authored by Matthew Wilcox's avatar Matthew Wilcox
Browse files

XArray: Fix xa_release in allocating arrays


xa_cmpxchg() was a little too magic in turning ZERO entries into NULL,
and would leave the entry set to the ZERO entry instead of releasing
it for future use.  After careful review of existing users of
xa_cmpxchg(), change the semantics so that it does not translate either
incoming argument from NULL into ZERO entries.

Add several tests to the test-suite to make sure this problem doesn't
come back.

Reported-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
parent f818b82b
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment