]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: reject mappings too large for device
authorOndrej Mosnáček <omosnacek@gmail.com>
Mon, 5 Jun 2017 15:52:39 +0000 (17:52 +0200)
committerMike Snitzer <snitzer@redhat.com>
Mon, 12 Jun 2017 21:05:55 +0000 (17:05 -0400)
commitff282e8a9ec4d3302e7499bc68da3c98ef3ab199
tree29576817c3611442cd60d2ffb7d3740a516586c2
parentc439244911f15093dc2d91096ca28c8764d4ef54
dm integrity: reject mappings too large for device

dm-integrity would successfully create mappings with the number of
sectors greater than the provided data sector count.  Attempts to read
sectors of this mapping that were beyond the provided data sector count
would then yield run-time messages of the form "device-mapper:
integrity: Too big sector number: ...".

Fix this by emitting an error when the requested mapping size is bigger
than the provided data sector count.

Signed-off-by: Ondrej Mosnacek <omosnacek@gmail.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c