• Jens Axboe's avatar
    io_uring: convert io_buffer_idr to XArray · 9e15c3a0
    Jens Axboe authored
    Like we did for the personality idr, convert the IO buffer idr to use
    XArray. This avoids a use-after-free on removal of entries, since idr
    doesn't like doing so from inside an iterator, and it nicely reduces
    the amount of code we need to support this feature.
    
    Fixes: 5a2e745d ("io_uring: buffer registration infrastructure")
    Cc: stable@vger.kernel.org
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: yangerkun <yangerkun@huawei.com>
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    9e15c3a0
io_uring.c 240 KB