Skip to content

[Issue]: Possible null-check typo in ibdevx: db_umem registration checks wq_umem #74

@ThunderousPupil

Description

@ThunderousPupil

How is this issue impacting you?

Application crash

Share Your Debug Logs

I found a possible null-check typo in ibdevx QP initialization code. After registering db_umem, the code appears to check wq_umem instead of db_umem.

Location

File:
src/modules/transport/ibdevx/ibdevx.cpp

Code snippet:

db_umem = mlx5dv_devx_umem_reg(context, dbr_buf, NVSHMEMT_IBDEVX_DBSIZE, 0);
NVSHMEMI_NULL_ERROR_JMP(wq_umem, status, NVSHMEMX_ERROR_INTERNAL, out,
                        "cannot register dbr buf for qpair.\n");

The second line is handling the result of db_umem registration, but checks wq_umem.
This might hide a db_umem == NULL failure path and lead to later undefined behavior.

Steps to Reproduce the Issue

No response

NVSHMEM Version

3.2.5

Your platform details

No response

Error Message & Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions