diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-09-02 18:38:29 +0530 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-10-21 17:44:03 +1030 |
commit | b353a6b821627053f82b4e7b907e824cb7a6879c (patch) | |
tree | a863bec4278a403bd63336b4f01b45794a987805 /drivers/pps | |
parent | d22a69892bd8f29e3096f6f54c2c00d8aec2e796 (diff) | |
download | talos-op-linux-b353a6b821627053f82b4e7b907e824cb7a6879c.tar.gz talos-op-linux-b353a6b821627053f82b4e7b907e824cb7a6879c.zip |
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 'drivers/pps')
0 files changed, 0 insertions, 0 deletions