Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential crash with calling ibv_free_device_list before ibv_open_device #11

Open
Xiphoseer opened this issue Dec 2, 2020 · 1 comment

Comments

@Xiphoseer
Copy link
Contributor

According to the man page for ibv_get_device_list.3, Client code should open all the devices it intends to use with ibv_open_device() before calling ibv_free_device_list(). This is not the case in BaseRDMA.cc, where the list is freed in line 95 before the device is opened in line 112. This doesn't crash immediately, because the ibv_device_t struct is copied in line 89 but it does decrement the internal reference count which unloads the device if it reaches zero and may cause some operations on the copy to crash if they are called.

@danfai
Copy link
Collaborator

danfai commented Jun 16, 2021

This should be fixed by your code #13 which is now merged with #16 ?

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

No branches or pull requests

2 participants