Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 596635

Summary: Kernel oops when a virtio-console port is hot-unplugged and program was blocked
Product: Red Hat Enterprise Linux 6 Reporter: Amit Shah <amit.shah>
Component: kernelAssignee: Amit Shah <amit.shah>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: amit.shah, lihuang, tburke
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 16:10:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Amit Shah 2010-05-27 08:14:53 UTC
Description of problem:

If a userspace program in a guest was blocked for read or write on a virtio-console port and the port is hot-unplugged, the kernel dereferences unused memory which leads to crashes.

Testing info:

Test 1 (read blocked):
- In guest:
# cat /dev/vport0p1

- In host,
  - connect to the host side of the port
  - unplug port 1

- In guest:


... leads to crash.

Test 2 (write blocked):
- In guest:
# echo "foo" > /dev/vport0p1

- In host (without connecting host side of port)
  - unplug port 1

- In guest:

... leads to crash

Patches submitted upstream:

Comment 1 RHEL Product and Program Management 2010-05-27 08:15:45 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 3 Aristeu Rozanski 2010-06-03 19:58:01 UTC
Patch(es) available on kernel-2.6.32-32.el6

Comment 6 lihuang 2010-08-11 09:44:03 UTC
reproduced on kernel-2.6.32-31.el6.x86_64 
 - for read test . the guest is not crash. on unfixed version. 'cat' process is not terminated. on fixed viersio. 'cat' process is terminated
 - for write test. the guest crashed .             

verified on kernel-2.6.32-59.1.el6.x86_64

/usr/libexec/qemu-kvm  -M rhel6.0.0 -enable-kvm -m 5120 -smp 2,sockets=2,cores=1,threads=1 -name rhel6 -uuid 1f34fb22-11d3-9fc6-d891-40320553569c -nodefconfig -nodefaults -chardev socket,host=,port=4444,server,nowait,id=monitor -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/home/images/rhel6.img,if=none,id=drive-ide0-0-0,boot=on,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:0b:98:be,bus=pci.0,addr=0x4  -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc :12 -k en-us -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=4,bus=pci.0 -chardev socket,id=channel0,path=/var/lib/libvirt/qemu/rhel6.channel0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0

Comment 7 2010-11-11 16:10:10 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.