resources: handle overflow when aligning start of available area
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 26 Oct 2010 21:41:28 +0000 (15:41 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 26 Oct 2010 22:33:28 +0000 (15:33 -0700)
If tmp.start is near ~0, ALIGN(tmp.start) may overflow, which would
make us think there's more available space than there really is.  We
would likely return something that conflicts with a previous resource,
which would cause a failure when allocate_resource() requests the newly-
allocated region.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=646027
Reported-by: Fabrice Bellet <fabrice@bellet.info>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

No differences found