summaryrefslogtreecommitdiffstats
path: root/rust/helpers/io.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-04-18 13:02:27 +0100
committerJens Axboe <axboe@kernel.dk>2025-04-18 06:12:10 -0600
commitf12ecf5e1c5eca48b8652e893afcdb730384a6aa (patch)
treee0532122ae62cd9b34c75afe12957696179ad541 /rust/helpers/io.c
parentb419bed4f0a62c65a57dd495185821dd56bc435c (diff)
downloadlinux-f12ecf5e1c5eca48b8652e893afcdb730384a6aa.tar.gz
linux-f12ecf5e1c5eca48b8652e893afcdb730384a6aa.tar.bz2
linux-f12ecf5e1c5eca48b8652e893afcdb730384a6aa.zip
io_uring/zcrx: fix late dma unmap for a dead dev
There is a problem with page pools not dma-unmapping immediately when the device is going down, and delaying it until the page pool is destroyed, which is not allowed (see links). That just got fixed for normal page pools, and we need to address memory providers as well. Unmap pages in the memory provider uninstall callback, and protect it with a new lock. There is also a gap between when a dma mapping is created and the mp is installed, so if the device is killed in between, io_uring would be holding on to dma mappings to a dead device with no one to call ->uninstall. Move it to page pool init and rely on ->is_mapped to make sure it's only done once. Link: https://lore.kernel.org/lkml/8067f204-1380-4d37-8ffd-007fc6f26738@kernel.org/T/ Link: https://lore.kernel.org/all/20250409-page-pool-track-dma-v9-0-6a9ef2e0cba8@redhat.com/ Fixes: 34a3e60821ab9 ("io_uring/zcrx: implement zerocopy receive pp memory provider") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/ef9b7db249b14f6e0b570a1bb77ff177389f881c.1744965853.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/helpers/io.c')
0 files changed, 0 insertions, 0 deletions