diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-11-02 19:06:06 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-11-02 19:06:06 +0000 |
commit | 06d93ba8a77a3432fe08e04b267eed7fac5b8476 (patch) | |
tree | 7012c796c7d3ef04a53d568e4468121536f02648 /sys/dev/pv/hyperv.c | |
parent | 2443fca94fe9e40aa0a14bf332b858d5e927288c (diff) |
Fixup a wait channel used during VMBus channel discovery
Clang static analyser has found that a tsleep was using an uninitialised
pointer value as a wait channel. An associated wakeup wasn't doing the
right thing either.
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r-- | sys/dev/pv/hyperv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index 2babb159910..205552beb9d 100644 --- a/sys/dev/pv/hyperv.c +++ b/sys/dev/pv/hyperv.c @@ -769,7 +769,7 @@ void hv_channel_delivered(struct hv_softc *sc, struct vmbus_chanmsg_hdr *hdr) { atomic_setbits_int(&sc->sc_flags, HSF_OFFERS_DELIVERED); - wakeup(hdr); + wakeup(&sc->sc_offers); } int @@ -943,7 +943,7 @@ int hv_channel_scan(struct hv_softc *sc) { struct vmbus_chanmsg_hdr hdr; - struct vmbus_chanmsg_choffer rsp, *offer; + struct vmbus_chanmsg_choffer rsp; struct hv_offer *co; SIMPLEQ_INIT(&sc->sc_offers); @@ -958,7 +958,7 @@ hv_channel_scan(struct hv_softc *sc) } while ((sc->sc_flags & HSF_OFFERS_DELIVERED) == 0) - tsleep(offer, PRIBIO, "hvoffers", 1); + tsleep(&sc->sc_offers, PRIBIO, "hvoffers", 1); TAILQ_INIT(&sc->sc_channels); mtx_init(&sc->sc_channelck, IPL_NET); |