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

Allocate memory for Remove lock using ExAllocatePoolWithTag(). #360

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

datacore-rm
Copy link

Issue: As discussed in #358, there was a bugcheck when kmem cache re-allocated same memory for IO remove lock.

Cause: zvol_assign_targetid() allocates memory for the IO_REMOVE_LOCK structure from kmem cache. Once it is freed, it can allocate the same cached memory in the next allocation call. This is making the driver verifier to flag that the same IO_REMOVE_LOCK structure is reinitialized second time.

Repro steps:
Create and destroy a zvol multiple times in a loop.

Fix:
Allocated remove lock memory using ExAllocatePoolWithTag(). DV correctly tracks this as a new instance of the remove lock and does not complain.

@lundman lundman merged commit f9fd639 into openzfsonwindows:development Mar 8, 2024
28 of 31 checks passed
datacore-rm added a commit to DataCoreSoftware/openzfs that referenced this pull request Mar 11, 2024
datacore-rm added a commit to DataCoreSoftware/openzfs that referenced this pull request Mar 11, 2024
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