From patchwork Sat Mar 7 23:53:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rientjes X-Patchwork-Id: 5960661 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E38BEBF440 for ; Sat, 7 Mar 2015 23:53:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECF2420256 for ; Sat, 7 Mar 2015 23:53:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 238E42022D for ; Sat, 7 Mar 2015 23:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753003AbbCGXxv (ORCPT ); Sat, 7 Mar 2015 18:53:51 -0500 Received: from mail-ig0-f173.google.com ([209.85.213.173]:42331 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbbCGXxu (ORCPT ); Sat, 7 Mar 2015 18:53:50 -0500 Received: by igkb16 with SMTP id b16so12645132igk.1 for ; Sat, 07 Mar 2015 15:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:user-agent:mime-version :content-type; bh=hDCcljDyHRUJaHPzF11WFYWrZ1ErCQr+a2bJVKUD424=; b=gv1duFja3wZDnyyPmvAtpOssyRYoo3gWJbJCVd1QM+8gDK3AvhjrwXDXwqkkkGA4Fs vJvO+4AlyrBxhP4ouaIe5oi7r/IH1XiOujrUd9aMuNNz5TiRxYnR6/pS6s+AuYPV/IRl vhJqHytwbb/EP2pLjG02bakXeRwRrEKaKst77B07KytgGyw8yjWQBY2BjbB4tq4EYP1a WJgaQY9kfamaNOiEO3mPzt7mHZnIwUYMF21ZwixLOS1jCmtqWY+ygmQPG9cnC61JvoUT cIeYrEygvSctyuZ3dN1FcsJ6UvPT9zelOW18LkBysmJtsXYtMOphs0NbiaWZICux3IR4 kqug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version:content-type; bh=hDCcljDyHRUJaHPzF11WFYWrZ1ErCQr+a2bJVKUD424=; b=SoyKr77bYupsLFdujyruYiCGJuIFf3kdYMmJVDfDjeYMfy0M2oTO9SVMiuulZXVoWN QBveUKs8rzrNcRxVwbkXWZ//hWQ+0CT5SUt9YaW1sDqut0LB3yPpn0bBw+5SFRQs5ljO RO98fgcWo8yAnuSGGCRVJg8x3xXyv/ESnVbSYD79ZyDTT3k1vClzQDDTiWTKrBhbc5VG 3lmH9rnJNwi3srsM3wSW13+T+/BR66y87eVuWWL1lkXmrPRGPGMp7JoC+vrjKjsAnmXf IYd8U53/RFyjH24mdTfkiuH6mPrKJzD/MBPlcluBGdN+Uw6e6mglsr1qml0y9qLHgA/m Ma2A== X-Gm-Message-State: ALoCoQlmKH52qgK1r8zuTqYxJqVRD3tYAivw4iDH9lZlLVU36xMAr41X5MK0QDwrt6I1N8YruvTm X-Received: by 10.42.88.1 with SMTP id a1mr18090403icm.29.1425772430257; Sat, 07 Mar 2015 15:53:50 -0800 (PST) Received: from [2620:0:1008:1101:a0e7:858f:fe1d:d33] ([2620:0:1008:1101:a0e7:858f:fe1d:d33]) by mx.google.com with ESMTPSA id n17sm3585058igi.2.2015.03.07.15.53.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Mar 2015 15:53:49 -0800 (PST) Date: Sat, 7 Mar 2015 15:53:48 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton cc: Paul Mundt , linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: [patch 1/2] sh, dwarf: destroy mempools on cleanup Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dwarf_reg_pool and dwarf_frame_pool are not properly destroyed when cleaning up the dwarf unwinder. Destroy them with mempool_destroy(). Also mark dwarf_unwinder_cleanup() as __init. Signed-off-by: David Rientjes --- arch/sh/kernel/dwarf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -993,7 +993,7 @@ static struct unwinder dwarf_unwinder = { .rating = 150, }; -static void dwarf_unwinder_cleanup(void) +static void __init dwarf_unwinder_cleanup(void) { struct dwarf_fde *fde, *next_fde; struct dwarf_cie *cie, *next_cie; @@ -1009,6 +1009,10 @@ static void dwarf_unwinder_cleanup(void) rbtree_postorder_for_each_entry_safe(cie, next_cie, &cie_root, node) kfree(cie); + if (dwarf_reg_pool) + mempool_destroy(dwarf_reg_pool); + if (dwarf_frame_pool) + mempool_destroy(dwarf_frame_pool); kmem_cache_destroy(dwarf_reg_cachep); kmem_cache_destroy(dwarf_frame_cachep); }