From: Xiongwei Song <sxwjean@gmail.com>
To: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] dm bufio: fix missed destroy of mutex c->lock
Date: Thu, 4 Jan 2018 22:31:26 +0800 [thread overview]
Message-ID: <20180104143126.29339-1-sxwjean@gmail.com> (raw)
The mutex c->lock is initialized in dm_bufio_client_create, however,
it is not destroyed before free the structure of dm_bufio_client in
dm_bufio_client_destroy.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
---
drivers/md/dm-bufio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index c546b567f3b5..53c0d5d2039a 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -1811,6 +1811,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);
--
2.15.1
reply other threads:[~2018-01-04 14:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180104143126.29339-1-sxwjean@gmail.com \
--to=sxwjean@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®