diff options
author | NeilBrown <neilb@suse.de> | 2008-12-19 16:25:01 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-14 09:44:05 -0800 |
commit | 902439b20fdb34fcc0e077a9180d5ec25c80be96 (patch) | |
tree | a0fcd2f26732ada0a12a13a6efbb854ac7e11c14 /sound | |
parent | 3eb62a1a8c1655cf88e44158938a28ef774fdc08 (diff) |
md: Don't read past end of bitmap when reading bitmap.
commit a2ed9615e3222645007fc19991aedf30eed3ecfd upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions