Reviewed by: George Wilson <george.wil...@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakha...@delphix.com>
In usr/src/uts/common/disp/cpupart.c, cpupart_create() allocates a buffer and assigns it to the cp_lgrploads member of a cpupart_t struct: pp->cp_nlgrploads = lgrp_plat_max_lgrps(); pp->cp_lgrploads = kmem_zalloc(sizeof (lpl_t) * pp->cp_nlgrploads, KM_SLEEP); The function then goes on to call cpupart_lpl_initialize(), which allocates an identical buffer and assigns it to the same field, leaking the original buffer: sz = cp->cp_nlgrploads = lgrp_plat_max_lgrps(); cp->cp_lgrploads = kmem_zalloc(sizeof (lpl_t) * sz, KM_SLEEP); We should be able to just remove the initial allocation. Upstream bug: DLPX-56280 You can view, comment on, or merge this pull request online at: https://github.com/openzfs/openzfs/pull/669 -- Commit Summary -- * 9675 memory leak from cpupart_create -- File Changes -- M usr/src/uts/common/disp/cpupart.c (6) -- Patch Links -- https://github.com/openzfs/openzfs/pull/669.patch https://github.com/openzfs/openzfs/pull/669.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/669 ------------------------------------------ openzfs: openzfs-developer Permalink: https://openzfs.topicbox.com/groups/developer/Tfd03570d1fb78266-M6cf08eec14de8974f9650461 Delivery options: https://openzfs.topicbox.com/groups/developer/subscription