summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-09-02 18:38:29 +0530
committerRusty Russell <rusty@rustcorp.com.au>2010-10-21 17:44:03 +1030
commitb353a6b821627053f82b4e7b907e824cb7a6879c (patch)
treea863bec4278a403bd63336b4f01b45794a987805 /samples
parentd22a69892bd8f29e3096f6f54c2c00d8aec2e796 (diff)
virtio: console: Add reference counting for port struct
When a port got hot-unplugged, when a port was open, any file operation after the unplugging resulted in a crash. This is fixed by ref-counting the port structure, and releasing it only when the file is closed. This splits the unplug operation in two parts: first marks the port as unavailable, removes all the buffers in the vqs and removes the port from the per-device list of ports. The second stage, invoked when all references drop to zero, releases the chardev and frees all other memory. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions