On 3/13/24 3:39 PM, Gabriel Krisman Bertazi wrote: > Looking at the error path of __io_uaddr_map, if we fail after pinning > the pages for any reasons, ret will be set to -EINVAL and the error > handler won't properly release the pinned pages. > > I didn't manage to trigger it without forcing a failure, but it can > happen in real life when memory is heavily fragmented. Good catch, fix looks good to me. I'll add a: Fixes: 223ef4743164 ("io_uring: don't allow IORING_SETUP_NO_MMAP rings on highmem pages") to it, however. -- Jens Axboe