Message ID | 53734C95.4040300@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <ocfs2-devel-bounces@oss.oracle.com> X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB4299F387 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 14 May 2014 11:01:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BC76202EB for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 14 May 2014 11:01:38 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1633F202D1 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 14 May 2014 11:01:37 +0000 (UTC) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s4EB1N1b012502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 May 2014 11:01:24 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s4EB1K1R012700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 May 2014 11:01:21 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <ocfs2-devel-bounces@oss.oracle.com>) id 1WkWw4-0006h7-IY; Wed, 14 May 2014 04:01:20 -0700 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <joseph.qi@huawei.com>) id 1WkWvo-0006gE-CJ for ocfs2-devel@oss.oracle.com; Wed, 14 May 2014 04:01:05 -0700 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s4EB12uU023359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for <ocfs2-devel@oss.oracle.com>; Wed, 14 May 2014 11:01:03 GMT Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by aserp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s4EB0wUH013421 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for <ocfs2-devel@oss.oracle.com>; Wed, 14 May 2014 11:01:01 GMT Received: from 172.24.2.119 (EHLO szxeml207-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AOQ75465; Wed, 14 May 2014 19:00:42 +0800 (CST) Received: from SZXEML450-HUB.china.huawei.com (10.82.67.193) by szxeml207-edg.china.huawei.com (172.24.2.56) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 14 May 2014 18:59:50 +0800 Received: from [127.0.0.1] (10.177.24.125) by szxeml450-hub.china.huawei.com (10.82.67.193) with Microsoft SMTP Server id 14.3.158.1; Wed, 14 May 2014 18:59:47 +0800 Message-ID: <53734C95.4040300@huawei.com> Date: Wed, 14 May 2014 18:59:33 +0800 From: Joseph Qi <joseph.qi@huawei.com> User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Andrew Morton <akpm@linux-foundation.org> X-Originating-IP: [10.177.24.125] X-CFilter-Loop: Reflected X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=119.145.14.66 ct-class=R3 ct-vol1=0 ct-vol2=6 ct-vol3=5 ct-risk=10 ct-spam1=0 ct-spam2=0 ct-bulk=90 rcpts=1 size=922 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=I/xcGrQg c=1 sm=1 tr=0 a=eEmLgr2igB2wGjJK32aQww==:117 a=eEmLgr2igB2wGjJK32aQww==:17 a=_ucFIcivCngA:10 a=qbvPwO2qtdkA:10 a=O9dq5j03pVQA:10 a=0flAxFmlLNcA:10 a=8nJEP1OIZ-IA:10 a=i0EeH86SAAAA:8 a=LYcAbpxHfI9lk2a5U-MA:9 a=wPNLvfGTeE IA:10 a=hPjdaMEvmhQA:10 X-Sendmail-CT-RefID: str=0001.0A090203.53734CEE.0085:SCFSTAT1612107, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Sendmail-CT-Classification: not spam Cc: Mark Fasheh <mfasheh@suse.com>, "ocfs2-devel@oss.oracle.com" <ocfs2-devel@oss.oracle.com> Subject: [Ocfs2-devel] [PATCH] ocfs2: fix double kmem_cache_destroy in dlm_init X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index af3f7aa..ee1f884 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -472,11 +472,15 @@ bail: void dlm_destroy_master_caches(void) { - if (dlm_lockname_cache) + if (dlm_lockname_cache) { kmem_cache_destroy(dlm_lockname_cache); + dlm_lockname_cache = NULL; + } - if (dlm_lockres_cache) + if (dlm_lockres_cache) { kmem_cache_destroy(dlm_lockres_cache); + dlm_lockres_cache = NULL; + } } static void dlm_lockres_release(struct kref *kref)
In dlm_init, if create dlm_lockname_cache failed in dlm_init_master_caches, it will destroy dlm_lockres_cache which created before twice. And this will cause system die when loading modules. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> --- fs/ocfs2/dlm/dlmmaster.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)