diff options
| author | NeilBrown <[email protected]> | 2007-05-23 13:58:09 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-05-23 20:14:14 -0700 |
| commit | 787f17feb204ed1c6331892fb8124b80dc9fe288 (patch) | |
| tree | f4403f7ba381255e03fd1b01eccd57c57a7976e8 /include/linux/debugobjects.h | |
| parent | 1dbf37e8adf1ab6b82a510d5e69fa676ed9717c4 (diff) | |
md: avoid overflow in raid0 calculation with large components
If a raid0 has a component device larger than 4TB, and is accessed on a 32bit
machines, then as 'chunk' is unsigned long,
chunk << chunksize_bits
can overflow (this can be as high as the size of the device in KB). chunk
itself will not overflow (without triggering a BUG).
So change 'chunk' to be 'sector_t, and get rid of the 'BUG' as it becomes
impossible to hit.
Cc: "Jeff Zheng" <[email protected]>
Signed-off-by: Neil Brown <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions