Message ID | 20171223102704.3087-1-akaraliou.dev@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Mike Snitzer |
Headers | show
Return-Path: <dm-devel-bounces@redhat.com> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 356E860375 for <patchwork-dm-devel@patchwork.kernel.org>; Sat, 30 Dec 2017 19:29:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2471428750 for <patchwork-dm-devel@patchwork.kernel.org>; Sat, 30 Dec 2017 19:29:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16C57286D2; Sat, 30 Dec 2017 19:29:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B1CB2286D2 for <patchwork-dm-devel@patchwork.kernel.org>; Sat, 30 Dec 2017 19:29:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1772581DEB; Sat, 30 Dec 2017 19:29:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C75FA5D6A2; Sat, 30 Dec 2017 19:28:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5D6BE4A467; Sat, 30 Dec 2017 19:28:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBNAReMe018286 for <dm-devel@listman.util.phx.redhat.com>; Sat, 23 Dec 2017 05:27:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 631535FCA7; Sat, 23 Dec 2017 10:27:40 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7622660C8E; Sat, 23 Dec 2017 10:27:36 +0000 (UTC) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 65375356E8; Sat, 23 Dec 2017 10:27:35 +0000 (UTC) Received: by mail-lf0-f67.google.com with SMTP id f18so33853486lfg.8; Sat, 23 Dec 2017 02:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=g3jD0N2RIqOtDpB9kzCtrsWwi2WXwPfoVSSB/9KigVU=; b=FMMfZaadlFT985Qgm0WmkyYhPHDLAsmGOp3GCCwbPM04Dox8/LsTsUH5fn22RMOUt9 HRfeVUIrr404Dg2MMKlplYjH4yJtTLEobtzpvBFd/9hG0mf9iYqrEw1UPSocE60ylXhz pLr8lib/OW0N4EvV93ntHlTfYJcSmw2s4xQHF4wA61y323MTRhCXkHfd14BAVysCTNM1 Rm3g1+BGeM+VGpGtoMT0//zoJUOsbaRj4GSDMw56bXD8K7xQSL0kx4Mll1InBi4RwOtM +cAiXPZz8w803LfG8jqgPBZOHGaWcaJRXIkqwD3BnwUI7XXDYYZ1R/KEsQ9i+dnc+dxz 950A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g3jD0N2RIqOtDpB9kzCtrsWwi2WXwPfoVSSB/9KigVU=; b=TJkJwv3DFZGbeqkcAtEMPUCIWn2tZkpAqs4/bPbDXZpYM0YPGB1dK+HBNAjFTE79P7 UIltFK5sDLjZoIkJSCVh/8tli3FaW1FIOGu/BdBouUIgwRUNhBbQixJS77qqePr3izOn l0FJjCfnuJO5aaId/+/K1L+jyaQ+OpmaweY7dBWypkdtl8poZJZWVbMmkfijJQC+b2L7 UMohA5LTeX1Efk/Y9Px8kV1IKy/T2lMlPJebMcshnx7q50Hw0ARP2GB87Sg3+lRYOWcy ioICU95T8XEKBbKHvipfioqBHgjtFi3v6UXsHJ73vsDgmnwVKBX76BABNCz6nf+7nSWP KPMQ== X-Gm-Message-State: AKGB3mIqlwJDIdbAP/Y0uJ9M+ov8cZOsP/5ETC6nM1OrjvdUZrBy/9V7 FS24aIo5jedYr3S8Lox3zF6xzg== X-Google-Smtp-Source: ACJfBos9AR7h/x0MILT0jDJcs0JKkdJFixfvHUfjHgbz8wF3swbwEO9OT4h1F21KB+/fwkVR/lcNbg== X-Received: by 10.25.38.134 with SMTP id m128mr8545827lfm.119.1514024853512; Sat, 23 Dec 2017 02:27:33 -0800 (PST) Received: from ah.Dlink ([93.125.107.25]) by smtp.gmail.com with ESMTPSA id l136sm5200380lfb.46.2017.12.23.02.27.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Dec 2017 02:27:32 -0800 (PST) From: Aliaksei Karaliou <akaraliou.dev@gmail.com> To: agk@redhat.com, snitzer@redhat.com Date: Sat, 23 Dec 2017 13:27:03 +0300 Message-Id: <20171223102704.3087-1-akaraliou.dev@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 23 Dec 2017 10:27:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 23 Dec 2017 10:27:35 +0000 (UTC) for IP:'209.85.215.67' DOMAIN:'mail-lf0-f67.google.com' HELO:'mail-lf0-f67.google.com' FROM:'akaraliou.dev@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.13 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.67 mail-lf0-f67.google.com 209.85.215.67 mail-lf0-f67.google.com <akaraliou.dev@gmail.com> X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Sat, 30 Dec 2017 14:28:54 -0500 Cc: dm-devel@redhat.com, Aliaksei Karaliou <akaraliou.dev@gmail.com> Subject: [dm-devel] [PATCH 1/2] dm bufio: add missed destroy of client's mutex X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development <dm-devel.redhat.com> List-Unsubscribe: <https://www.redhat.com/mailman/options/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=unsubscribe> List-Archive: <https://www.redhat.com/archives/dm-devel> List-Post: <mailto:dm-devel@redhat.com> List-Help: <mailto:dm-devel-request@redhat.com?subject=help> List-Subscribe: <https://www.redhat.com/mailman/listinfo/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 30 Dec 2017 19:29:07 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index c546b567f3b5..1c661d4c211c 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1767,6 +1767,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign } dm_io_client_destroy(c->dm_io); bad_dm_io: + mutex_destroy(&c->lock); kfree(c); bad_client: return ERR_PTR(r); @@ -1811,6 +1812,7 @@ void dm_bufio_client_destroy(struct dm_bufio_client *c) BUG_ON(c->n_buffers[i]); dm_io_client_destroy(c->dm_io); + mutex_destroy(&c->lock); kfree(c); } EXPORT_SYMBOL_GPL(dm_bufio_client_destroy);
dm_bufio_client_destroy() does not destroy dm_bufio_client->lock. dm_bufio_client_create() does not do that on fallback path too. Signed-off-by: Aliaksei Karaliou <akaraliou.dev@gmail.com> --- drivers/md/dm-bufio.c | 2 ++ 1 file changed, 2 insertions(+)