HomeFreeBSD

Rework linux accept(2). This makes the code flow easier to follow,

Description

Rework linux accept(2). This makes the code flow easier to follow,
and fixes a bug where calling accept(2) could result in closing fd 0.

Note that the code still contains a number of problems: it makes
assumptions about l_sockaddr_in being the same as sockaddr_in,
the EFAULT-related code looks like it doesn't work at all, and the
socket type check is racy. Those will be addressed later on;
I'm trying to work in small steps to avoid breaking one thing while
fixing another.

It fixes Redis, among other things.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25461

Details

Provenance
traszAuthored on
Reviewer
kib
Differential Revision
D25461: Rework linux accept(2)
Parents
rS362832: MFC r362006: Prevent TCP Cubic to abruptly increase cwnd after app-limited
Branches
Unknown
Tags
Unknown