lkml.org 
[lkml]   [2006]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fix sun partition overflow over 1T
From
Date
Ar Gwe, 2006-08-04 am 11:22 -0500, ysgrifennodd Eric Sandeen:
> Although sun partition labels aren't supposed to support > 1T, apparently
> linux partition editors will allow up to 2T. This can cause problems
> in the kernel when these larger partitions are read, due to a signed
> int container.
>
> num_sectors in the sun_disklabel struct is marked as __u32 in 2.4, and
> as __be32 in 2.6. However, this is assigned to a signed int in
> sun_partition():
>
> int num_sectors;
>
> st_sector = be32_to_cpu(p->start_cylinder) * spc;
> num_sectors = be32_to_cpu(p->num_sectors);
>
> Changing num_sectors to an unsigned int avoids this problem.
>

> Signed-off-by: Eric Sandeen <esandeen@redhat.com>

Acked-by: Alan Cox <alan@redhat.com>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-04 18:39    [W:0.266 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site