hw/xen: Avoid Avoid use of uninitialized bufioreq_evtchn
cover hw/xen: Avoid Avoid use of uninitialized bufioreq_evtchn
From: "Edgar E. Iglesias" <[email protected]>
This has a fix for Coverity CID 1563383 reported by Peter.
Avoid use of uninitialized bufioreq_evtchn. It should only be used if buffered IOREQs are enabled.
Cheers,
Edgar
Edgar E. Iglesias (1):
hw/xen: Avoid use of uninitialized bufioreq_evtchn
hw/xen/xen-hvm-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/1 hw/xen: Avoid use of uninitialized bufioreq_evtchn
From: "Edgar E. Iglesias" <[email protected]>
Avoid use of uninitialized bufioreq_evtchn. It should only be used if buffered IOREQs are enabled.
Resolves: Coverity CID 1563383
--- hw/xen/xen-hvm-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen-hvm-common.c +4 -3
@@ -752,9 +752,10 @@ static int xen_map_ioreq_server(XenIOState *state)return -1 ; } -trace_xen_map_ioreq_server_buffered_io_evtchn (bufioreq_evtchn); - - state->bufioreq_remote_port = bufioreq_evtchn; +if (state->has_bufioreq) { +trace_xen_map_ioreq_server_buffered_io_evtchn (bufioreq_evtchn); + state->bufioreq_remote_port = bufioreq_evtchn; + }return 0 ; }
Signature · 1 line
2.43.0
Re: [PATCH v1 1/1] hw/xen: Avoid use of uninitialized bufioreq_evtchn
Quoted 8 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Avoid use of uninitialized
bufioreq_evtchn. It should only be used if buffered IOREQs are enabled.Resolves: Coverity CID 1563383
Reported-by Peter Maydell <[email protected]>Signed-off-by Edgar E. Iglesias <[email protected]>
Quoted 25 lines
--- hw/xen/xen-hvm-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)hw/xen/xen-hvm-common.c +4
-3@@ -752,9 +752,10 @@ static int xen_map_ioreq_server(XenIOState *state)return -1 ; } -trace_xen_map_ioreq_server_buffered_io_evtchn (bufioreq_evtchn); - - state->bufioreq_remote_port = bufioreq_evtchn; +if (state->has_bufioreq) { +trace_xen_map_ioreq_server_buffered_io_evtchn (bufioreq_evtchn); + state->bufioreq_remote_port = bufioreq_evtchn; + }return 0 ; }Signature · 1 line
2.43.0