From: Mike Snitzer Date: Sun, 25 Sep 2011 22:26:17 +0000 (+0100) Subject: dm table: avoid crash if integrity profile changes X-Git-Tag: v3.1-rc10~20^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876fbba1db4a377f050a2bb49b474c7527b2995d;p=pandora-kernel.git dm table: avoid crash if integrity profile changes Commit a63a5cf (dm: improve block integrity support) introduced a two-phase initialization of a DM device's integrity profile. This patch avoids dereferencing a NULL 'template_disk' pointer in blk_integrity_register() if there is an integrity profile mismatch in dm_table_set_integrity(). This can occur if the integrity profiles for stacked devices in a DM table are changed between the call to dm_table_prealloc_integrity() and dm_table_set_integrity(). Reported-by: Zdenek Kabelac Signed-off-by: Mike Snitzer Signed-off-by: Alasdair G Kergon Cc: stable@kernel.org # 2.6.39 --- Reading git-diff-tree failed