]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache: fix NULL pointer when switching from cleaner policy
authorJoe Thornber <ejt@redhat.com>
Fri, 9 Oct 2015 13:03:38 +0000 (14:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 9 Oct 2015 13:16:29 +0000 (09:16 -0400)
commit3ad3ba1eca5f4b7301075bfcb62c659818f32432
tree6d14a28ef23e4633451ca5fb39ee54f0e7d4776b
parentc929edf93c94a9bf1884eaf884b93550feb91c6e
dm cache: fix NULL pointer when switching from cleaner policy

The cleaner policy doesn't make use of the per cache block hint space in
the metadata (unlike the other policies).  When switching from the
cleaner policy to mq or smq a NULL pointer crash (in dm_tm_new_block)
was observed.  The crash was caused by bugs in dm-cache-metadata.c
when trying to skip creation of the hint btree.

The minimal fix is to change hint size for the cleaner policy to 4 bytes
(only hint size supported).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-cache-policy-cleaner.c