From: Mike Snitzer Date: Fri, 22 Mar 2019 20:12:22 +0000 (-0400) Subject: dm space map common: zero entire ll_disk X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c6e086e0c9b2133f38563707c96b22fd0906f570;p=linux.git dm space map common: zero entire ll_disk Otherwise, memory that is allocated (and potentially not previously zeroed) will get written to disk as part of the space maps. Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c index 0a3b8ae4a29c6..b8a62188f6be5 100644 --- a/drivers/md/persistent-data/dm-space-map-common.c +++ b/drivers/md/persistent-data/dm-space-map-common.c @@ -190,6 +190,8 @@ static int sm_find_free(void *addr, unsigned begin, unsigned end, static int sm_ll_init(struct ll_disk *ll, struct dm_transaction_manager *tm) { + memset(ll, 0, sizeof(struct ll_disk)); + ll->tm = tm; ll->bitmap_info.tm = tm;