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

Move dmu_buf_rele() after dsl_dataset_sync_done() #14523

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

gamanakis
Copy link
Contributor

Motivation and Context

Closes #14522

Description

Move dmu_buf_rele() after dsl_dataset_sync_done(), otherwise the dataset may be freed after the last dmu_buf_rele() leading to a panic.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@gamanakis gamanakis marked this pull request as ready for review February 23, 2023 21:17
@gamanakis
Copy link
Contributor Author

CC @tonyhutter for including this in 2.1.10.

@mmaybee mmaybee requested a review from ahrens February 23, 2023 21:21
@mmaybee mmaybee self-assigned this Feb 23, 2023
@mmaybee mmaybee requested a review from behlendorf February 23, 2023 21:22
Otherwise the dataset may be freed after the last dmu_buf_rele() leading
to a panic.

Signed-off-by: George Amanakis <gamanakis@gmail.com>
@mmaybee mmaybee merged commit d816bc5 into openzfs:master Feb 24, 2023
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Feb 24, 2023
gamanakis added a commit to gamanakis/zfs that referenced this pull request 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
behlendorf pushed a commit that referenced this pull request Mar 1, 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 #14522
Closes #14523
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request 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
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dereference of dataset_t after dropping reference
4 participants