Permalink
Browse files

OpenZFS 9688 - aggsum_fini leaks memory

Porting Notes:
- Most of these fixes were applied in the original 37fb3e4
  commit when this change was ported for Linux.

Authored by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: George Melikov <mail@gmelikov.ru>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9688
OpenZFS-commit: openzfs/openzfs@29bf2d6
Closes #8042
  • Loading branch information...
pcd1193182 authored and BrainSlayer committed May 23, 2018
1 parent 3020a48 commit 52190781ddabe8bd175c87950258505b9b182041
Showing with 7 additions and 2 deletions.
  1. +1 −1 module/zfs/aggsum.c
  2. +6 −1 module/zfs/arc.c
@@ -13,7 +13,7 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 2017 by Delphix. All rights reserved.
* Copyright (c) 2017, 2018 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -7852,8 +7852,13 @@ arc_fini(void)
cv_destroy(&arc_reclaim_thread_cv);
cv_destroy(&arc_reclaim_waiters_cv);
arc_state_fini();
/*
* buf_fini() must proceed arc_state_fini() because buf_fin() may
* trigger the release of kmem magazines, which can callback to
* arc_space_return() which accesses aggsums freed in act_state_fini().
*/
buf_fini();
arc_state_fini();
ASSERT0(arc_loaned_bytes);
}

0 comments on commit 5219078

Please sign in to comment.