]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: test for corrupted disk format during table load
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 21 Jul 2017 15:58:38 +0000 (11:58 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 25 Jul 2017 14:11:14 +0000 (10:11 -0400)
commit26a64198879f6c6847ea6c79a3c6c531a80eef88
tree5476c50923b0377e7761f2eba6ff0198859c8df4
parent3b4efb1dc8184893fb44efcb98b5911df3d058f8
dm integrity: test for corrupted disk format during table load

If the dm-integrity superblock was corrupted in such a way that the
journal_sections field was zero, the integrity target would deadlock
because it would wait forever for free space in the journal.

Detect this situation and refuse to activate the device.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 9aa2cd3d5bc2 ("dm: add integrity target")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c