Red Hat Bugzilla – Bug 217995
blkback: Fix first_sect check
Last modified: 2007-11-30 17:07:38 EST
We want changeset 11860 from xen-unstable.
[BLOCK] blkback: Fix first_sect check
The blkback code checks first_sect by computing last_sect - first_sect + 1.
If this is not positive then the request is rejected. Unfortunately, the
calculation is stored in an unsigned integer before the check is made so
negative values will not be rejected.
This patch fixes this by explictly comparing first_sect with last_sect.
The blktap code is similar but it stores the difference in a signed integer
so it's OK.
Signed-off-by: Herbert Xu <firstname.lastname@example.org>
QE ack for RHEL5.
2.6.18-7.el5 included in 20070125.0.