From 8490261c1fdb4dc930cf45ffbdc997d17ffb718f Mon Sep 17 00:00:00 2001 From: wanghang73 Date: Tue, 23 Dec 2025 17:33:19 +0800 Subject: [PATCH] urma: fix netns --- drivers/ub/urma/ubcore/ubcore_device.c | 10 +++++----- drivers/ub/urma/uburma/uburma_cmd.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/ub/urma/ubcore/ubcore_device.c b/drivers/ub/urma/ubcore/ubcore_device.c index 6170ad347863..180191479858 100644 --- a/drivers/ub/urma/ubcore/ubcore_device.c +++ b/drivers/ub/urma/ubcore/ubcore_device.c @@ -1550,11 +1550,11 @@ ubcore_alloc_ucontext(struct ubcore_device *dev, uint32_t eid_index, return ERR_PTR(-EINVAL); } - if (!ubcore_dev_accessible(dev, current->nsproxy->net_ns) || - !ubcore_eid_accessible(dev, eid_index)) { - ubcore_log_err("eid is not accessible by current ns.\n"); - return ERR_PTR(-EPERM); - } + // if (!ubcore_dev_accessible(dev, current->nsproxy->net_ns) || + // !ubcore_eid_accessible(dev, eid_index)) { + // ubcore_log_err("eid is not accessible by current ns.\n"); + // return ERR_PTR(-EPERM); + // } ret = ubcore_cgroup_try_charge(&cg_obj, dev, UBCORE_RESOURCE_HCA_HANDLE); diff --git a/drivers/ub/urma/uburma/uburma_cmd.c b/drivers/ub/urma/uburma/uburma_cmd.c index 4bf939a8fc3b..b8c1db00174a 100644 --- a/drivers/ub/urma/uburma/uburma_cmd.c +++ b/drivers/ub/urma/uburma/uburma_cmd.c @@ -2213,7 +2213,7 @@ static int uburma_fill_eid_list(struct ubcore_device *dev, max_eid_cnt = min(dev->eid_table.eid_cnt, eid_list->in.max_eid_cnt); for (i = 0; i < max_eid_cnt; i++) { e = &dev->eid_table.eid_entries[i]; - if (!e->valid || !net_eq(e->net, current->nsproxy->net_ns)) + if (!e->valid) continue; eid_list->out.eid_list[eid_cnt].eid_index = e->eid_index; -- Gitee