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

Refresh db_buf pointer after lock and conditional wait. #17069

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IvanVolosyuk
Copy link
Contributor

@IvanVolosyuk IvanVolosyuk commented Feb 19, 2025

Motivation and Context

Try to solve the encrypted zfs send issue. This is purely theoretical change, I wasn't been able to reproduce the issue myself, but looking at the code this have come to mind.

Description

I'm not very familiar with the zfs code base, but I think there is a logic issue in the code.
The db_buf reference can be changed by the code holding dndb->db_mtx mutex and waiting on mutex can take a while, so the reference can become stale.

How Has This Been Tested?

Show pass the test suite test without an issue I would imagine.

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Work in Progress Not yet ready for general review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant