Bug 217995 - blkback: Fix first_sect check
Summary: blkback: Fix first_sect check
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Rik van Riel
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-01 05:27 UTC by Herbert Xu
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-26 20:57:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Herbert Xu 2006-12-01 05:27:43 UTC
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.org.au>

Comment 2 Don Zickus 2006-12-05 19:53:55 UTC
in 2.6.18-1.2817.el5

Comment 3 Jay Turner 2006-12-06 22:49:50 UTC
QE ack for RHEL5.

Comment 4 Jay Turner 2007-01-26 20:57:01 UTC
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.