HomeFreeBSD

sendto: don't clear transient errors for atomic protocols

Description

sendto: don't clear transient errors for atomic protocols

The changeset 65572cade35 uncovered the fact that top layer of sendto(2)
would clear a transient error code if some data was copied out of uio.
The clearing of the error makes sense for non-atomic protocols, since
they have sent some data. The atomic protocols send all or nothing.

The current implementation of unix/dgram uses sosend_generic(), which
would always copyout and only then it may fail to deliver a message.
The sosend_dgram(), currently used by UDP only, also has same behavior.

Reported by: pho
Reviewed by: pho, markj
Differential revision: https://reviews.freebsd.org/D34309

Details

Provenance
glebiusAuthored on Feb 17 2022, 5:07 PM
Reviewer
pho
Differential Revision
D34309: sendto: don't clear transient errors for atomic protocols
Parents
rGe0ac9dc2b069: bhyve nvme: Advertise Namespace changed AEN
Branches
Unknown
Tags
Unknown