From: David Miller <davem@davemloft.net>
To: alan@lxorguk.ukuu.org.uk
Cc: esandeen@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix sun partition overflow over 1T
Date: Fri, 04 Aug 2006 16:35:49 -0700 (PDT) [thread overview]
Message-ID: <20060804.163549.106287275.davem@davemloft.net> (raw)
In-Reply-To: <1154710590.23655.248.camel@localhost.localdomain>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Fri, 04 Aug 2006 17:56:30 +0100
> 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>
Applied, thanks a lot.
prev parent reply other threads:[~2006-08-04 23:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 16:22 Eric Sandeen
2006-08-04 16:56 ` Alan Cox
2006-08-04 23:35 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060804.163549.106287275.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=esandeen@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®