From patchwork Wed Jun 4 16:38:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 4295881 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96C45BEEA7 for ; Wed, 4 Jun 2014 16:38:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9DBA201DD for ; Wed, 4 Jun 2014 16:38:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C28F6201CE for ; Wed, 4 Jun 2014 16:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751418AbaFDQim (ORCPT ); Wed, 4 Jun 2014 12:38:42 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:35272 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbaFDQil (ORCPT ); Wed, 4 Jun 2014 12:38:41 -0400 Received: by mail-la0-f47.google.com with SMTP id pn19so4577190lab.34 for ; Wed, 04 Jun 2014 09:38:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=58iSw6jJrz66HTSj+5o6Cyuv/w4BH8YzesGr6kQPXSE=; b=HJ1w89QuhzOLz/Z200JQOUDsp+T1B76jz3GtjCIgBffV5Tgx3KPU4IkdlaV66NUaiv 9KVwRCswGWviuS1vHCZBB00vu5BiODj/DI/EHZ07aAV8OsJkk+r5ioNObNsste9+tG4A qplAwRhJxR+P+d5/OckRRJzhJhUbRgiO2l5KedgbJ5ugRYTaP5n9/CxPhMbJ+4mXIgls A/8yqRY0t2pJzGAoDHx2m8juMqulPODnCBv+4enpZos6/+slOR4rwiNycXzkldTPPmaz RoJx57K7cHO5qEkfzXxT//0l5O2biRFi2v9s8oIHgkCDmgLgU/zOXbKFLyuvIHpQ0u4g amyQ== X-Gm-Message-State: ALoCoQnnctiggyB41CBBnbg+jLcxMBo0VEjigF2/+AZA0hJFvh2bSEkMB7RdxB8bhrubay1xotA2 X-Received: by 10.152.10.2 with SMTP id e2mr3632747lab.76.1401899920233; Wed, 04 Jun 2014 09:38:40 -0700 (PDT) Received: from localhost ([109.110.66.45]) by mx.google.com with ESMTPSA id vq4sm2973240lbb.14.2014.06.04.09.38.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 04 Jun 2014 09:38:39 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH] rbd: fix ida/idr memory leak Date: Wed, 4 Jun 2014 20:38:37 +0400 Message-Id: <1401899917-11254-1-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 ida_destroy() needs to be called on module exit to release ida caches. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- drivers/block/rbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 94747afc2e78..ecdd4aee173c 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5464,6 +5464,7 @@ err_out_slab: static void __exit rbd_exit(void) { + ida_destroy(&rbd_dev_id_ida); rbd_sysfs_cleanup(); if (single_major) unregister_blkdev(rbd_major, RBD_DRV_NAME);