All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dm bufio: add missed destroy of client's mutex
@ 2017-12-23 10:27 Aliaksei Karaliou
  2017-12-23 10:27 ` [PATCH 2/2] dm bufio: check result of register_shrinker() Aliaksei Karaliou
  0 siblings, 1 reply; 2+ messages in thread
From: Aliaksei Karaliou @ 2017-12-23 10:27 UTC (permalink / raw)
  To: agk, snitzer; +Cc: dm-devel, Aliaksei Karaliou

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(+)

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);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-23 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-23 10:27 [PATCH 1/2] dm bufio: add missed destroy of client's mutex Aliaksei Karaliou
2017-12-23 10:27 ` [PATCH 2/2] dm bufio: check result of register_shrinker() Aliaksei Karaliou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.