]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm space map metadata: fix occasional leak of a metadata block on resize
authorJoe Thornber <ejt@redhat.com>
Wed, 17 Jun 2015 12:35:19 +0000 (13:35 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 4 Jul 2015 03:02:32 +0000 (23:02 -0400)
commitda010e81b4a100a810d373d3cb9ad3348eb6b70a
tree2ca821267844ec87e2a756fe85abc570894b2b36
parent0815b75f534fb3d55a6f4020513c6c932583f095
dm space map metadata: fix occasional leak of a metadata block on resize

[ Upstream commit 6096d91af0b65a3967139b32d5adbb3647858a26 ]

The metadata space map has a simplified 'bootstrap' mode that is
operational when extending the space maps.  Whilst in this mode it's
possible for some refcount decrement operations to become queued (eg, as
a result of shadowing one of the bitmap indexes).  These decrements were
not being applied when switching out of bootstrap mode.

The effect of this bug was the leaking of a 4k metadata block.  This is
detected by the latest version of thin_check as a non fatal error.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/md/persistent-data/dm-space-map-metadata.c