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

Sriharsha Basavapatna
2026-01-13T17:14:16Z

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

On Sat, Jan 10, 2026 at 12:31 AM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> 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.
Updated to use rcu + mutex.
Thanks,
-Harsha
>
> Jason

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5505 bytes --]