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) #95

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

datacore-rm
Copy link
Collaborator

Issue: As discussed in openzfsonwindows#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.

@datacore-rm datacore-rm merged commit 28bd257 into datacore-windows Mar 11, 2024
0 of 8 checks passed
@datacore-rm datacore-rm deleted the SSV-23333-downstream branch March 11, 2024 05: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.

1 participant