+10
−6
Loading
netdev ops must be called under instance lock or rtnl_lock, but io_register_zcrx_ifq() isn't doing this for netdev_queue_get_dma_dev(). Fix this by taking the instance lock using netdev_get_by_index_lock(). Extended the instance lock section to include attaching a memory provider. Could not move io_zcrx_create_area() outside, since the dmabuf codepath IORING_ZCRX_AREA_DMABUF requires ifq->dev. Fixes: 59b8b32a ("io_uring/zcrx: add support for custom DMA devices") Signed-off-by:David Wei <dw@davidwei.uk> Reviewed-by:
Pavel Begunkov <asml.silence@gmail.com> Reviewed-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Jens Axboe <axboe@kernel.dk>