mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
xarray-extract-helper-from-__xa_insertcmpxchg-fix
fix __xa_erase() Link: https://lkml.kernel.org/r/CAJ-ks9kN_qddZ3Ne5d=cADu5POC1rHd4rQcbVSD_spnZOrLLZg@mail.gmail.com Signed-off-by: Tamir Duberstein <tamird@gmail.com> Reported-by: <syzbot+092bbab7da235a02a03a@syzkaller.appspotmail.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Matthew Wilcox <willy@infradead.org> Cc: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
4b67927e9c
commit
afdbcfc779
@ -1509,7 +1509,7 @@ static void *xas_result(struct xa_state *xas, void *curr)
|
||||
void *__xa_erase(struct xarray *xa, unsigned long index)
|
||||
{
|
||||
XA_STATE(xas, xa, index);
|
||||
return xas_result(&xas, xas_store(&xas, NULL));
|
||||
return xas_result(&xas, xa_zero_to_null(xas_store(&xas, NULL)));
|
||||
}
|
||||
EXPORT_SYMBOL(__xa_erase);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user