Commit b9efbe2
committed
virtio_console: fix misc probe bugs
This fixes the following issue discovered by code review:
after vqs have been created, a buggy device can send an interrupt.
A control vq callback will then try to schedule control_work which has
not been initialized yet. Similarly for config interrupt. Further, in
and out vq callbacks invoke find_port_by_vq which attempts to take
ports_lock which also has not been initialized.
To fix, init all locks and work before creating vqs.
Message-ID: <ad982e975a6160ad110c623c016041311ca15b4f.1726511547.git.mst@redhat.com>
Fixes: 17634ba ("virtio: console: Add a new MULTIPORT feature, support for generic ports")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>1 parent 83c334e commit b9efbe2
1 file changed
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2007 | 2007 | | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | 2010 | | |
2017 | 2011 | | |
2018 | 2012 | | |
2019 | 2013 | | |
2020 | | - | |
2021 | | - | |
2022 | 2014 | | |
2023 | 2015 | | |
2024 | 2016 | | |
2025 | 2017 | | |
2026 | 2018 | | |
2027 | 2019 | | |
| 2020 | + | |
2028 | 2021 | | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2029 | 2031 | | |
2030 | 2032 | | |
2031 | 2033 | | |
| |||
0 commit comments