aboutsummaryrefslogtreecommitdiff
path: root/lib/random32.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-12-19 16:25:01 +1100
committerNeilBrown <neilb@suse.de>2008-12-19 16:25:01 +1100
commita2ed9615e3222645007fc19991aedf30eed3ecfd (patch)
tree2a07cc815f5c348f085ad96a5660e3213da955f4 /lib/random32.c
parent55dac3a5553b13891f0ae4bbd11920619b5436d4 (diff)
md: Don't read past end of bitmap when reading bitmap.
When we read the write-intent-bitmap off the device, we currently read a whole number of pages. When PAGE_SIZE is 4K, this works due to the alignment we enforce on the superblock and bitmap. When PAGE_SIZE is 64K, this case read past the end-of-device which causes an error. When we write the superblock, we ensure to clip the last page to just be the required size. Copy that code into the read path to just read the required number of sectors. Signed-off-by: Neil Brown <neilb@suse.de> Cc: stable@kernel.org
Diffstat (limited to 'lib/random32.c')
0 files changed, 0 insertions, 0 deletions