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

Fix a resource leak in uu_avl_pool_destroy: #11528

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Jan 26, 2021

Motivation and Context

uu_avl_pool_create creates a pthread mutex that never gets destroyed.

Description

Destroy the pthread mutex created in uu_avl_pool_destroy.

How Has This Been Tested?

It's been included in FreeBSD since 2014. I've done no testing on other OSes.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from: FreeBSD
Sponsored by: Spectra Logic Corporation
Signed-off-by: Alan Somers asomers@gmail.com

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:

Need to destroy the pthread mutex created in uu_avl_pool_create.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from:	FreeBSD
Sponsored by:	Spectra Logic Corporation
Signed-off-by:	Alan Somers <asomers@gmail.com>
@ghost ghost added Component: Userspace user space functionality Status: Code Review Needed Ready for review and testing labels Jan 26, 2021
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 26, 2021
@behlendorf behlendorf merged commit 6b2e720 into openzfs:master Jan 27, 2021
behlendorf pushed a commit that referenced this pull request Jan 28, 2021
Need to destroy the pthread mutex created in uu_avl_pool_create.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from: FreeBSD
Sponsored by:	Spectra Logic Corporation
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes #11528
@asomers asomers deleted the uu_avl_pool_destroy branch January 28, 2021 23:58
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Need to destroy the pthread mutex created in uu_avl_pool_create.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from: FreeBSD
Sponsored by:	Spectra Logic Corporation
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes openzfs#11528
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
Need to destroy the pthread mutex created in uu_avl_pool_create.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from: FreeBSD
Sponsored by:	Spectra Logic Corporation
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes openzfs#11528
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Userspace user space functionality Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants