-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Dereference of dataset_t after dropping reference #14522
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
@gamanakis Could you take a look at this please? |
@mmaybee thanks for reporting this. I think it may be best to move the feature activation code before the |
Took a look at the callers of |
13 tasks
gamanakis
added a commit
to gamanakis/zfs
that referenced
this issue
Feb 27, 2023
Otherwise the dataset may be freed after the last dmu_buf_rele() leading to a panic. Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#14522 Closes openzfs#14523
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Mar 3, 2023
Otherwise the dataset may be freed after the last dmu_buf_rele() leading to a panic. Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#14522 Closes openzfs#14523
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Describe the problem you're observing
With a recent change to
dsl_dataset_sync_done()
(in 34ce4c4), a dereference tods
was added after the call todmu_buf_rele()
(for the ds-ds_dbuf) at the end of the function. Since the dataset_t can be freed after the last rele, this can lead to a reference to freed memory (and a panic).The call to
dmu_buf_rele()
needs to be moved to the end of the function... or, better yet, perhaps moved into the caller (since the ds is being passed in).Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: