Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/wscons



Module Name:    src
Committed By:   riastradh
Date:           Sat Nov 22 15:39:24 UTC 2025

Modified Files:
        src/sys/dev/wscons: wsmux.c

Log Message:
wsmux(4): Fix sense of assertion in kqfilter.

This was recently changed in rev. 1.68 to tighten bogus run-time
conditionals into assertions -- with a small snag in this particular
hunk:

@@ -613,12 +589,7 @@ wsmuxkqfilter(dev_t dev, struct knote *kn)
                return (1);
        }

-       if (sc->sc_base.me_evp == NULL) {
-#ifdef DIAGNOSTIC
-               printf("wsmuxkqfilter: not open\n");
-#endif
-               return (1);
-       }
+       KASSERTMSG(sc->sc_base.me_evp == NULL, "wsmuxkqfilter: not open\n");

        return (wsevent_kqfilter(sc->sc_base.me_evp, kn));
 }

An astute reader will notice that there is something amiss in the
translation from `if (<cond>)' to `KASSERTMSG(<cond>, ...)'.

Candidate fix for:

PR kern/59727: wsmux changes in April 2025 seem to have broken kqueue
on wsmux

(Evidently we need some better testing for all this wscons(4)
business.)


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/wscons/wsmux.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index