Skip to content

FreeBSD: Ensure that z_pflags is initialized for new znodes #17486

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

markjdb
Copy link
Contributor

@markjdb markjdb commented Jun 24, 2025

Motivation and Context

Running the FreeBSD regression test suite with KMSAN enabled showed a new regression stemming from commit 5e5253b.

Description

The change initializes a field in the root znode of a dataset that was previously left uninitialized, a bug uncovered by the recent addition of projects support.

How Has This Been Tested?

FreeBSD regression test suite (which is what triggered the bug originally).

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)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • 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:

The field is subsequently accessed in zfs_mknode(), in
zfs_inherit_projid().  The Linux implementation of zfs_create_fs() has
this initialization already; there is no counterpart to
zfs_create_share_dir() that I can see.

Reported-by: KMSAN
Signed-off-by: Mark Johnston <[email protected]>
Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label Jun 25, 2025
@amotin amotin merged commit 0a2163d into openzfs:master Jun 25, 2025
36 of 37 checks passed
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.

3 participants