RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 844542 - virtio: Use ida to allocate virtio index
Summary: virtio: Use ida to allocate virtio index
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Asias He
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-31 03:14 UTC by Asias He
Modified: 2013-02-21 06:44 UTC (History)
4 users (show)

Fixed In Version: kernel-2.6.32-301.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 06:44:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0496 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6 kernel update 2013-02-20 21:40:54 UTC

Description Asias He 2012-07-31 03:14:15 UTC
Description of problem:

    Current index allocation in virtio is based on a monotonically
    increasing variable "index". This means we'll run out of numbers
    after a while. E.g. someone crazy doing this in host side.
    
    while(1) {
        hot-plug a virtio device
        hot-unplug the virito devcie
    }


Version-Release number of selected component (if applicable):

How reproducible:

100%

Steps to Reproduce:
1. hot-plug a virtio device, e.g. virito-blk
2. hot-unplug the virito devcie
3. goto step 1 until loop == 10 times 
4. hot-plug the virtio device

Actual results:
# ls -l /sys/block/vda/device
lrwxrwxrwx 1 root root 0 Jul 30 23:04 /sys/block/vda/device -> ../../../virtio10

Expected results:
The virtio device should pointed to the original virito number instead of increasing monotonically.

Additional info:
Upstream fix is: 90e03207f468e84258270ad07095ef50f925c17d, I will backport to RHEL6.4 soon.

Comment 2 RHEL Program Management 2012-08-10 18:39:07 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 4 Jarod Wilson 2012-08-24 19:27:34 UTC
Patch(es) available on kernel-2.6.32-301.el6

Comment 7 Sibiao Luo 2012-12-17 03:44:14 UTC
Reproduce this issue on 2.6.32-300.el6.x86_64 with the same steps as comment #0.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-300.el6.x86_64   <---------
qemu-kvm-0.12.1.2-2.334.el6.x86_64
guest info:
# uname -r
2.6.32-300.el6.x86_64   <---------

Results:
after steps 4, the virtio device number will increase monotonically, did not point to the original virito number.
eg:
# ls -l /sys/block/vda/device
lrwxrwxrwx. 1 root root 0 Dec 17 19:00 /sys/block/vda/device -> ../../../virtio10

Verify this issue on 2.6.32-345.el6.x86_64 with the same steps as comment #0.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-345.el6.x86_64   <---------
qemu-kvm-0.12.1.2-2.334.el6.x86_64
guest info:
# uname -r
2.6.32-345.el6.x86_64   <---------

Results:
The virtio device pointed to the original virtio number instead of increasing monotonically after hot-plug the virtio blk device again.
e.g:
# ls -l /sys/block/vda/device
lrwxrwxrwx. 1 root root 0 Dec 17 19:35 /sys/block/vda/device -> ../../../virtio2

# ls -l /sys/block/vda/device
lrwxrwxrwx. 1 root root 0 Dec 17 19:35 /sys/block/vda/device -> ../../../virtio2

Base on above, this issue has been fixed correctly.

Comment 8 juzhang 2012-12-18 03:12:41 UTC
According to comment7, set this issue as verified.

Comment 10 errata-xmlrpc 2013-02-21 06:44:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0496.html


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