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

assert fd != -1 in unmap path #395

Closed
wants to merge 1 commit into from
Closed

assert fd != -1 in unmap path #395

wants to merge 1 commit into from

Conversation

jlevon
Copy link
Collaborator

@jlevon jlevon commented Mar 17, 2021

We shouldn't even be trying to unmap if the region doesn't have an associated
file descriptor.

Signed-off-by: John Levon [email protected]

We shouldn't even be trying to unmap if the region doesn't have an associated
file descriptor.

Signed-off-by: John Levon <[email protected]>
@jlevon jlevon marked this pull request as ready for review March 17, 2021 11:54
@jlevon jlevon requested review from tmakatos and swapnili March 17, 2021 11:54
Copy link
Member

@tmakatos tmakatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per #391 (comment) I'm planning to always call _dma_controller_do_remove_region and we internally figure out whether or not there's cleanup to be done.

@jlevon
Copy link
Collaborator Author

jlevon commented Mar 17, 2021

"internally figure out" - isn't that best in dma_controller_remove_region() ? I think the changes I have for this and:

https://github.com/nutanix/libvfio-user/pull/394/files

make sense no?

@jlevon
Copy link
Collaborator Author

jlevon commented Mar 19, 2021

I folded this into the big DMA PR #396, as so much has changed.

@jlevon jlevon closed this Mar 19, 2021
@jlevon jlevon deleted the unmap-assert-fd branch December 21, 2021 19:55
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.

2 participants