[Bug 86778] Precedence bug in patch
Blaisorblade
p.giarrusso at gmail.com
Wed Feb 21 17:27:36 UTC 2007
Public bug reported:
Binary package hint: linux-source-2.6.15
When compiling linux-source, I got an unexpected warning, which turned
out to be caused by these two commits (links are per Dapper and Edgy):
http://www2.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper-updates.git;a=commitdiff;h=622f7b4c920a9362d506400c0da02e3e06442b27
http://www2.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-edgy.git;a=commitdiff;h=622f7b4c920a9362d506400c0da02e3e06442b27
In particular, since '>>' has lower precedence than +, the below hunk
doesn't do what it wants to do. I've not tested which bad things can
happen, but it warrants a fix. In fact, in mainline the missing
parentheses have been added - see commit
ac924c6034d9095f95ee889f7e31bbb9145da0c2, merged in 2.6.17.
@@ -2462,8 +2464,8 @@ void setup_per_zone_pages_min(void)
zone->pages_min = tmp;
}
- zone->pages_low = zone->pages_min + tmp / 4;
- zone->pages_high = zone->pages_min + tmp / 2;
+ zone->pages_low = zone->pages_min + tmp >> 2;
+ zone->pages_high = zone->pages_min + tmp >> 1;
spin_unlock_irqrestore(&zone->lru_lock, flags);
}
}
** Affects: linux-source-2.6.15 (Ubuntu)
Importance: Undecided
Status: Unconfirmed
** Affects: linux-source-2.6.17 (Ubuntu)
Importance: Undecided
Status: Unconfirmed
** Also affects: linux-source-2.6.17 (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
Precedence bug in patch
https://launchpad.net/bugs/86778
More information about the kernel-bugs
mailing list