Revision 20cd0c86553e14c495451ce7d1e2e4efd81041f0 authored by Manos Pitsidianakis on 24 March 2024, 10:04:59 UTC, committed by Michael Tokarev on 09 April 2024, 18:15:05 UTC
The current handling of invalid virtqueue elements inside the TX/RX virt
queue handlers is wrong.

They are added in a per-stream invalid queue to be processed after the
handler is done examining each message, but the invalid message might
not be specifying any stream_id; which means it's invalid to add it to
any stream->invalid queue since stream could be NULL at this point.

This commit moves the invalid queue to the VirtIOSound struct which
guarantees there will always be a valid temporary place to store them
inside the tx/rx handlers. The queue will be emptied before the handler
returns, so the queue must be empty at any other point of the device's
lifetime.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <virtio-snd-rewrite-invalid-tx-rx-message-handling-v1.manos.pitsidianakis@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 731655f87f319fd06f27282c6cafbc2467ac8045)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
1 parent 627aa46
History
File Mode Size
idef-parser
imported
mmvec
README -rw-r--r-- 13.5 KB
arch.c -rw-r--r-- 13.3 KB
arch.h -rw-r--r-- 1.5 KB
attribs.h -rw-r--r-- 1.1 KB
attribs_def.h.inc -rw-r--r-- 8.7 KB
cpu-param.h -rw-r--r-- 967 bytes
cpu-qom.h -rw-r--r-- 803 bytes
cpu.c -rw-r--r-- 12.9 KB
cpu.h -rw-r--r-- 4.4 KB
cpu_bits.h -rw-r--r-- 1.7 KB
decode.c -rw-r--r-- 30.9 KB
decode.h -rw-r--r-- 1.0 KB
dectree.py -rwxr-xr-x 13.7 KB
fma_emu.c -rw-r--r-- 19.7 KB
fma_emu.h -rw-r--r-- 1.4 KB
gdbstub.c -rw-r--r-- 3.4 KB
gen_analyze_funcs.py -rwxr-xr-x 9.5 KB
gen_dectree_import.c -rw-r--r-- 5.7 KB
gen_helper_funcs.py -rwxr-xr-x 12.7 KB
gen_helper_protos.py -rwxr-xr-x 7.5 KB
gen_idef_parser_funcs.py -rw-r--r-- 5.4 KB
gen_op_attribs.py -rwxr-xr-x 1.3 KB
gen_op_regs.py -rwxr-xr-x 3.9 KB
gen_opcodes_def.py -rwxr-xr-x 1.1 KB
gen_printinsn.py -rwxr-xr-x 6.2 KB
gen_semantics.c -rw-r--r-- 4.0 KB
gen_shortcode.py -rwxr-xr-x 1.9 KB
gen_tcg.h -rw-r--r-- 52.9 KB
gen_tcg_func_table.py -rwxr-xr-x 1.9 KB
gen_tcg_funcs.py -rwxr-xr-x 25.5 KB
gen_tcg_hvx.h -rw-r--r-- 36.0 KB
genptr.c -rw-r--r-- 44.7 KB
genptr.h -rw-r--r-- 3.1 KB
helper.h -rw-r--r-- 4.6 KB
hex_arch_types.h -rw-r--r-- 1.3 KB
hex_common.py -rwxr-xr-x 10.5 KB
hex_regs.h -rw-r--r-- 2.9 KB
iclass.c -rw-r--r-- 2.5 KB
iclass.h -rw-r--r-- 1.5 KB
insn.h -rw-r--r-- 2.2 KB
internal.h -rw-r--r-- 1.5 KB
macros.h -rw-r--r-- 22.4 KB
meson.build -rw-r--r-- 9.6 KB
op_helper.c -rw-r--r-- 42.5 KB
op_helper.h -rw-r--r-- 1.0 KB
opcodes.c -rw-r--r-- 3.4 KB
opcodes.h -rw-r--r-- 1.5 KB
printinsn.c -rw-r--r-- 4.2 KB
printinsn.h -rw-r--r-- 996 bytes
reg_fields.c -rw-r--r-- 972 bytes
reg_fields.h -rw-r--r-- 1.0 KB
reg_fields_def.h.inc -rw-r--r-- 1.4 KB
translate.c -rw-r--r-- 39.2 KB
translate.h -rw-r--r-- 6.8 KB

README

back to top