Re: git: 60d5a4216b34 - main - unix/stream: fix EVFILT_WRITE after we did shutdown(2)

From: Alan Somers <asomers_at_freebsd.org>
Date: Sun, 07 Sep 2025 19:38:05 UTC
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.