Skip to content

fix: correct null-check variable after db_umem registration in ibdevx#80

Open
Doondi-Ashlesh wants to merge 1 commit intoNVIDIA:develfrom
Doondi-Ashlesh:fix/ibdevx-db-umem-null-check
Open

fix: correct null-check variable after db_umem registration in ibdevx#80
Doondi-Ashlesh wants to merge 1 commit intoNVIDIA:develfrom
Doondi-Ashlesh:fix/ibdevx-db-umem-null-check

Conversation

@Doondi-Ashlesh
Copy link
Copy Markdown

Summary

Fixes a copy-paste bug in the ibdevx QP initialization code reported in #74.

After registering db_umem, the null-check macro incorrectly checks wq_umem instead of db_umem:

// Before (incorrect):
db_umem = mlx5dv_devx_umem_reg(context, dbr_buf, NVSHMEMT_IBDEVX_DBSIZE, 0);
NVSHMEMI_NULL_ERROR_JMP(wq_umem, ...);  // checks wrong variable

// After (correct):
db_umem = mlx5dv_devx_umem_reg(context, dbr_buf, NVSHMEMT_IBDEVX_DBSIZE, 0);
NVSHMEMI_NULL_ERROR_JMP(db_umem, ...);  // checks the just-registered variable

If db_umem registration fails and returns NULL, the error would go undetected (since wq_umem was already successfully registered and is non-null), leading to a later null dereference at line 447 when db_umem->umem_id is accessed.

Fixes #74

@Doondi-Ashlesh
Copy link
Copy Markdown
Author

Hi, just checking in on this PR, it should be ready to merge once reviewed.
Happy to make changes if anything needs to be updated. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant