aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorgen Lundman <lundman@lundman.net>2021-07-01 15:22:16 +0000
committerGitHub <noreply@github.com>2021-07-01 15:22:16 +0000
commiteca174527e0b8416550e6ce87c405702fd379ada (patch)
tree348bb282dac6477661c3981c74951d93841376af
parent50e09eddd0c556ace90357b081d23df3f00c2d83 (diff)
downloadsrc-eca174527e0b8416550e6ce87c405702fd379ada.tar.gz
src-eca174527e0b8416550e6ce87c405702fd379ada.zip
Upstream: dmu_zfetch_stream_fini leaks refcount
dmu_zfetch_stream_fini() is missing calls to destroy the refcounts, leaking them and the mutex inside. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #12294
-rw-r--r--module/zfs/dmu_zfetch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/dmu_zfetch.c b/module/zfs/dmu_zfetch.c
index 4a323fa990fe..a26b0d739921 100644
--- a/module/zfs/dmu_zfetch.c
+++ b/module/zfs/dmu_zfetch.c
@@ -159,6 +159,8 @@ static void
dmu_zfetch_stream_fini(zstream_t *zs)
{
ASSERT(!list_link_active(&zs->zs_node));
+ zfs_refcount_destroy(&zs->zs_callers);
+ zfs_refcount_destroy(&zs->zs_refs);
kmem_free(zs, sizeof (*zs));
}