Skip to content

Commit

Permalink
Upstream: dmu_zfetch_stream_fini leaks refcount
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lundman authored and behlendorf committed Aug 31, 2021
1 parent c794ccd commit ccf3122
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/dmu_zfetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit ccf3122

Please sign in to comment.