]> www.infradead.org Git - users/hch/misc.git/commitdiff
io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
authorFeng Zhou <zhoufeng.zf@bytedance.com>
Fri, 12 Sep 2025 14:01:33 +0000 (22:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 01:12:53 +0000 (18:12 -0700)
ifq->if_rxq has not been assigned, is -1, the correct value is
in reg.if_rxq.

Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices")
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Link: https://patch.msgid.link/20250912140133.97741-1-zhoufeng.zf@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
io_uring/zcrx.c

index 319eddfd30e090f6e9a3f97aa58f2a1435d3a181..3639283c87ca6853ba5d383b41a6257dbac08d64 100644 (file)
@@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
                goto err;
        }
 
-       ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq);
+       ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
        if (!ifq->dev) {
                ret = -EOPNOTSUPP;
                goto err;