Bug 217995 - blkback: Fix first_sect check
blkback: Fix first_sect check
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rik van Riel
Depends On:
  Show dependency treegraph
Reported: 2006-12-01 00:27 EST by Herbert Xu
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-26 15:57:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Herbert Xu 2006-12-01 00:27:43 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 <herbert@gondor.apana.org.au>
Comment 2 Don Zickus 2006-12-05 14:53:55 EST
in 2.6.18-1.2817.el5
Comment 3 Jay Turner 2006-12-06 17:49:50 EST
QE ack for RHEL5.
Comment 4 Jay Turner 2007-01-26 15:57:01 EST
2.6.18-7.el5 included in 20070125.0.

Note You need to log in before you can comment on or make changes to this bug.