Re: [PATCH rdma-next v6 3/4] RDMA/bnxt_re: Direct Verbs: Support DBR verbs

Jason Gunthorpe
2026-01-09T19:01:56Z

On Wed, Dec 24, 2025 at 09:56:01AM +0530, Sriharsha Basavapatna wrote:
> @@ -217,6 +218,7 @@ struct bnxt_re_dev {
> struct delayed_work dbq_pacing_work;
> DECLARE_HASHTABLE(cq_hash, MAX_CQ_HASH_BITS);
> DECLARE_HASHTABLE(srq_hash, MAX_SRQ_HASH_BITS);
> + DECLARE_HASHTABLE(dpi_hash, MAX_DPI_HASH_BITS);
> struct dentry *dbg_root;
> struct dentry *qp_debugfs;
> unsigned long event_bitmap;

hash tables require locking.

hash_for_each_possible(rdev->dpi_hash, tmp_obj, hash_entry, dpi) {
if (tmp_obj->dpi.dpi == dpi) {
obj = tmp_obj;
break;
}
}

vs

hash_del(&obj->hash_entry);
kfree(obj);

Has no lock I can see and is not safe without one.

Jason