hfsplus: Apply Andrew Morton's incremental fix to hfsplus-limit-to-2tb.patch
svn path=/dists/trunk/linux-2.6/; revision=14374
This commit is contained in:
parent
d47a159011
commit
e3e1389b83
|
@ -14,8 +14,7 @@ I am not confident that I can find and fix all cases where a sector
|
||||||
number may be truncated. For now, avoid data loss by refusing to mount
|
number may be truncated. For now, avoid data loss by refusing to mount
|
||||||
HFS+ volumes with more than 2^32 sectors (2TB).
|
HFS+ volumes with more than 2^32 sectors (2TB).
|
||||||
|
|
||||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
[plus fix by Andrew Morton <akpm@linux-foundation.org>]
|
||||||
Cc: stable@kernel.org
|
|
||||||
---
|
---
|
||||||
--- a/fs/hfsplus/wrapper.c
|
--- a/fs/hfsplus/wrapper.c
|
||||||
+++ b/fs/hfsplus/wrapper.c
|
+++ b/fs/hfsplus/wrapper.c
|
||||||
|
@ -23,7 +22,7 @@ Cc: stable@kernel.org
|
||||||
|
|
||||||
if (hfsplus_get_last_session(sb, &part_start, &part_size))
|
if (hfsplus_get_last_session(sb, &part_start, &part_size))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
+ if (part_start + part_size > 0x100000000) {
|
+ if ((u64)part_start + part_size > 0x100000000ULL) {
|
||||||
+ pr_err("hfs: volumes larger than 2TB are not supported yet\n");
|
+ pr_err("hfs: volumes larger than 2TB are not supported yet\n");
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in New Issue