summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-crypt.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-12-11 00:51:54 +0100
committerAlasdair G Kergon <agk@redhat.com>2009-12-11 00:51:54 +0100
commit8e87b9b81b3c370f7e53c1ab6e1c3519ef37a644 (patch)
tree272a8532e12749c6c8419dcab0c341604646c571 /drivers/md/dm-crypt.c
parentdm snapshot: only take lock for statustype info not table (diff)
downloadlinux-8e87b9b81b3c370f7e53c1ab6e1c3519ef37a644.tar.xz
linux-8e87b9b81b3c370f7e53c1ab6e1c3519ef37a644.zip
dm snapshot: cope with chunk size larger than origin
Under some special conditions the snapshot hash_size is calculated as zero. This patch instead sets a minimum value of 64, the same as for the pending exception table. rounddown_pow_of_two(0) is an undefined operation (it expands to shift by -1). init_exception_table with an argument of 0 would fail with -ENOMEM. The way to trigger the problem is to create a snapshot with a chunk size that is larger than the origin device. Cc: stable@kernel.org Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-crypt.c')
0 files changed, 0 insertions, 0 deletions