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
--00000000000070162c063e3b3607 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 2, 2025 at 2:34=E2=80=AFPM Gleb Smirnoff <glebius@freebsd.org> = wrote: > The branch main has been updated by glebius: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D60d5a4216b3479a2d62eb65f2cb03b7= 99546dcbb > > 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, an= d > the > eafe5967ac558 shouldn't have touched the second block. The removal o= f > 'kn->kn_flags |=3D EV_EOF' was incorrect and the statement on origina= l > 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. --00000000000070162c063e3b3607 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote gmail_quote_container"><div dir= =3D"ltr" class=3D"gmail_attr">On Tue, Sep 2, 2025 at 2:34=E2=80=AFPM Gleb S= mirnoff <<a href=3D"mailto:glebius@freebsd.org">glebius@freebsd.org</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The b= ranch main has been updated by glebius:<br> <br> URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D60d5a4216b3479a2d= 62eb65f2cb03b799546dcbb" rel=3D"noreferrer" target=3D"_blank">https://cgit.= FreeBSD.org/src/commit/?id=3D60d5a4216b3479a2d62eb65f2cb03b799546dcbb</a><b= r> <br> commit 60d5a4216b3479a2d62eb65f2cb03b799546dcbb<br> Author:=C2=A0 =C2=A0 =C2=A0Gleb Smirnoff <glebius@FreeBSD.org><br> AuthorDate: 2025-09-02 20:34:12 +0000<br> Commit:=C2=A0 =C2=A0 =C2=A0Gleb Smirnoff <glebius@FreeBSD.org><br> CommitDate: 2025-09-02 20:34:12 +0000<br> <br> =C2=A0 =C2=A0 unix/stream: fix EVFILT_WRITE after we did shutdown(2)<br> <br> =C2=A0 =C2=A0 When fixing bug 286692, the change eafe5967ac558, that fixed = a case when<br> =C2=A0 =C2=A0 peer side does close(), also had regressed a case when our si= de does<br> =C2=A0 =C2=A0 shutdown(SHUT_WR).=C2=A0 These actually are two independent c= ode paths, and the<br> =C2=A0 =C2=A0 eafe5967ac558 shouldn't have touched the second block.=C2= =A0 The removal of<br> =C2=A0 =C2=A0 'kn->kn_flags |=3D EV_EOF' was incorrect and the s= tatement on original<br> =C2=A0 =C2=A0 behavior in the commit message was also incorrect.<br> <br> =C2=A0 =C2=A0 Do not add back so_error setting, since I failed to find a te= st case that<br> =C2=A0 =C2=A0 would return anything but 0 in kevent.fflags when run on stab= le/14.<br> <br> =C2=A0 =C2=A0 This was found with help of <a href=3D"https://github.com/tok= io-rs/mio" rel=3D"noreferrer" target=3D"_blank">https://github.com/tokio-rs= /mio</a>.=C2=A0 Add a test<br> =C2=A0 =C2=A0 case into our test suite for that.<br> <br> =C2=A0 =C2=A0 Fixes:=C2=A0 eafe5967ac558de142d91660e18e9238289890e3<br> <br> =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 markj<b= r> =C2=A0 =C2=A0 Differential Revision:=C2=A0 <a href=3D"https://reviews.freeb= sd.org/D52327" rel=3D"noreferrer" target=3D"_blank">https://reviews.freebsd= .org/D52327</a> <br></blockquote><div><br></div><div>Thanks, Gleb.=C2=A0 I can confirm that= this fixes mio for me.=C2=A0</div></div></div> --00000000000070162c063e3b3607--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hj7CGCHhj4vRswDO=ZL-8ApCL_=6q_psJHiEopUrkNwg>