linux/drivers/md/persistent-data
Joe Thornber 9b460d3699 dm btree: fix a recursion depth bug in btree walking code
The walk code was using a 'ro_spine' to hold it's locked btree nodes.
But this data structure is designed for the rolling lock scheme, and
as such automatically unlocks blocks that are two steps up the call
chain.  This is not suitable for the simple recursive walk algorithm,
which retraces its steps.

This code is only used by the persistent array code, which in turn is
only used by dm-cache.  In order to trigger it you need to have a
mapping tree that is more than 2 levels deep; which equates to 8-16
million cache blocks.  For instance a 4T ssd with a very small block
size of 32k only just triggers this bug.

The fix just places the locked blocks on the stack, and stops using
the ro_spine altogether.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
2014-11-10 15:23:58 -05:00
..
Kconfig dm: fix Kconfig indentation 2014-03-03 17:31:07 -05:00
Makefile dm persistent data: add bitset 2013-03-01 22:45:51 +00:00
dm-array.c dm array: fix a reference counting bug in shadow_ablock 2013-12-13 14:22:10 -05:00
dm-array.h dm persistent data: add transactional array 2013-03-01 22:45:51 +00:00
dm-bitset.c dm bitset: only flush the current word if it has been dirtied 2014-03-27 16:56:23 -04:00
dm-bitset.h dm bitset: only flush the current word if it has been dirtied 2014-03-27 16:56:23 -04:00
dm-block-manager.c dm transaction manager: fix corruption due to non-atomic transaction commit 2014-03-27 16:56:23 -04:00
dm-block-manager.h dm transaction manager: fix corruption due to non-atomic transaction commit 2014-03-27 16:56:23 -04:00
dm-btree-internal.h dm btree: fix a recursion depth bug in btree walking code 2014-11-10 15:23:58 -05:00
dm-btree-remove.c dm thin: fix discard corruption 2013-03-20 17:21:24 +00:00
dm-btree-spine.c dm btree: fix a recursion depth bug in btree walking code 2014-11-10 15:23:58 -05:00
dm-btree.c dm btree: fix a recursion depth bug in btree walking code 2014-11-10 15:23:58 -05:00
dm-btree.h dm btree: add dm_btree_find_lowest_key 2014-01-09 16:29:17 -05:00
dm-persistent-data-internal.h
dm-space-map-common.c dm space map common: make sure new space is used during extend 2014-01-07 21:05:17 -05:00
dm-space-map-common.h dm persistent data: only commit space map if index changed 2012-07-27 15:08:06 +01:00
dm-space-map-disk.c dm space map disk: optimise sm_disk_dec_block 2013-11-09 18:20:24 -05:00
dm-space-map-disk.h
dm-space-map-metadata.c dm space map metadata: fix refcount decrement below 0 which caused corruption 2014-03-07 12:02:47 -05:00
dm-space-map-metadata.h dm thin: allow metadata space larger than supported to go unused 2014-02-27 11:49:08 -05:00
dm-space-map.h dm persistent data: add threshold callback to space map 2013-05-10 14:37:20 +01:00
dm-transaction-manager.c dm transaction manager: fix corruption due to non-atomic transaction commit 2014-03-27 16:56:23 -04:00
dm-transaction-manager.h dm transaction manager: fix corruption due to non-atomic transaction commit 2014-03-27 16:56:23 -04:00