Date: Sun, 7 Sep 2025 13:38:05 -0600 From: Alan Somers <asomers@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 60d5a4216b34 - main - unix/stream: fix EVFILT_WRITE after we did shutdown(2) Message-ID: <CAOtMX2hj7CGCHhj4vRswDO=ZL-8ApCL_=6q_psJHiEopUrkNwg@mail.gmail.com> In-Reply-To: <202509022034.582KYMeX068298@gitrepo.freebsd.org> References: <202509022034.582KYMeX068298@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Tue, Sep 2, 2025 at 2:34 PM Gleb Smirnoff <glebius@freebsd.org> wrote: > The branch main has been updated by glebius: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=60d5a4216b3479a2d62eb65f2cb03b799546dcbb > > commit 60d5a4216b3479a2d62eb65f2cb03b799546dcbb > Author: Gleb Smirnoff <glebius@FreeBSD.org> > AuthorDate: 2025-09-02 20:34:12 +0000 > Commit: Gleb Smirnoff <glebius@FreeBSD.org> > CommitDate: 2025-09-02 20:34:12 +0000 > > unix/stream: fix EVFILT_WRITE after we did shutdown(2) > > When fixing bug 286692, the change eafe5967ac558, that fixed a case > when > peer side does close(), also had regressed a case when our side does > shutdown(SHUT_WR). These actually are two independent code paths, and > the > eafe5967ac558 shouldn't have touched the second block. The removal of > 'kn->kn_flags |= EV_EOF' was incorrect and the statement on original > behavior in the commit message was also incorrect. > > Do not add back so_error setting, since I failed to find a test case > that > would return anything but 0 in kevent.fflags when run on stable/14. > > This was found with help of https://github.com/tokio-rs/mio. Add a > test > case into our test suite for that. > > Fixes: eafe5967ac558de142d91660e18e9238289890e3 > > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D52327 > Thanks, Gleb. I can confirm that this fixes mio for me. [-- Attachment #2 --] <div dir="ltr"><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Sep 2, 2025 at 2:34 PM Gleb Smirnoff <<a href="mailto:glebius@freebsd.org">glebius@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The branch main has been updated by glebius:<br> <br> URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=60d5a4216b3479a2d62eb65f2cb03b799546dcbb" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=60d5a4216b3479a2d62eb65f2cb03b799546dcbb</a><br> <br> commit 60d5a4216b3479a2d62eb65f2cb03b799546dcbb<br> Author:   Gleb Smirnoff <glebius@FreeBSD.org><br> AuthorDate: 2025-09-02 20:34:12 +0000<br> Commit:   Gleb Smirnoff <glebius@FreeBSD.org><br> CommitDate: 2025-09-02 20:34:12 +0000<br> <br>   unix/stream: fix EVFILT_WRITE after we did shutdown(2)<br> <br>   When fixing bug 286692, the change eafe5967ac558, that fixed a case when<br>   peer side does close(), also had regressed a case when our side does<br>   shutdown(SHUT_WR). These actually are two independent code paths, and the<br>   eafe5967ac558 shouldn't have touched the second block. The removal of<br>   'kn->kn_flags |= EV_EOF' was incorrect and the statement on original<br>   behavior in the commit message was also incorrect.<br> <br>   Do not add back so_error setting, since I failed to find a test case that<br>   would return anything but 0 in kevent.fflags when run on stable/14.<br> <br>   This was found with help of <a href="https://github.com/tokio-rs/mio" rel="noreferrer" target="_blank">https://github.com/tokio-rs/mio</a>. Add a test<br>   case into our test suite for that.<br> <br>   Fixes: eafe5967ac558de142d91660e18e9238289890e3<br> <br>   Reviewed by:      markj<br>   Differential Revision: <a href="https://reviews.freebsd.org/D52327" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D52327</a> <br></blockquote><div><br></div><div>Thanks, Gleb. I can confirm that this fixes mio for me. </div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hj7CGCHhj4vRswDO=ZL-8ApCL_=6q_psJHiEopUrkNwg>
