|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] fix uninitialized variable error in do_poll()
commit 34af96ed586fa4594453fabccbd87a5eb686ff16
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Oct 5 16:24:56 2018 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Oct 5 16:24:56 2018 +0200
fix uninitialized variable error in do_poll()
Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2
apparently is no longer sure that "port" is indeed initialized at
if ( sched_poll->nr_ports == 1 )
v->poll_evtchn = port;
It doesn't look to be impossible for the compiler to prove it is not,
but we also can't rely on that to be the case. Add an initializer.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
xen/common/schedule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index f426fd8202..a957c5e57c 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1014,7 +1014,7 @@ static long do_poll(struct sched_poll *sched_poll)
{
struct vcpu *v = current;
struct domain *d = v->domain;
- evtchn_port_t port;
+ evtchn_port_t port = 0;
long rc;
unsigned int i;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |