vldcp(4)'s read and write event filters have a discrepancy relative to
the old poll code. They should report non-activeness when the condition
(err == 0 && state == LDC_CHANNEL_UP && head != tail) is false. Now they
can return a stale value, causing a spurious wakeup of
kevent/poll/select. This can be fixed by clearing kn->kn_data.
Could someone test this with ldomd?
Index: arch/sparc64/dev/vldcp.c
===================================================================
RCS file: src/sys/arch/sparc64/dev/vldcp.c,v
retrieving revision 1.23
diff -u -p -r1.23 vldcp.c
--- arch/sparc64/dev/vldcp.c 2 Jul 2022 08:50:41 -0000 1.23
+++ arch/sparc64/dev/vldcp.c 9 Jul 2022 13:39:10 -0000
@@ -617,6 +617,7 @@ filt_vldcpread(struct knote *kn, long hi
} else {
cbus_intr_setenabled(sc->sc_bustag, sc->sc_rx_ino,
INTR_ENABLED);
+ kn->kn_data = 0;
}
splx(s);
@@ -641,6 +642,7 @@ filt_vldcwrite(struct knote *kn, long hi
} else {
cbus_intr_setenabled(sc->sc_bustag, sc->sc_tx_ino,
INTR_ENABLED);
+ kn->kn_data = 0;
}
splx(s);