All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix uninitialized variable error in do_poll()
@ 2018-10-05 10:12 Jan Beulich
  2018-10-05 10:28 ` Wei Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2018-10-05 10:12 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall

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@suse.com>

--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1014,7 +1014,7 @@ static long do_poll(struct sched_poll *s
 {
     struct vcpu   *v = current;
     struct domain *d = v->domain;
-    evtchn_port_t  port;
+    evtchn_port_t  port = 0;
     long           rc;
     unsigned int   i;
 



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-05 11:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 10:12 [PATCH] fix uninitialized variable error in do_poll() Jan Beulich
2018-10-05 10:28 ` Wei Liu
2018-10-05 11:22   ` Jan Beulich
2018-10-05 11:25     ` Wei Liu
2018-10-05 11:43       ` Andrew Cooper
2018-10-05 11:56         ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.