Re: [PATCH] io_uring: Fix release of pinned pages when __io_uaddr_map fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux