Page MenuHomeFreeBSD

unix/dgram: inline sbappendaddr_locked() into uipc_sosend_dgram()
ClosedPublic

Authored by glebius on May 23 2022, 9:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 4:45 AM
Unknown Object (File)
Sep 30 2024, 4:31 PM
Unknown Object (File)
Sep 26 2024, 7:21 PM
Unknown Object (File)
Sep 24 2024, 6:41 PM
Unknown Object (File)
Sep 24 2024, 6:15 PM
Unknown Object (File)
Sep 24 2024, 9:30 AM
Unknown Object (File)
Sep 20 2024, 9:22 AM
Unknown Object (File)
Sep 20 2024, 12:03 AM
Subscribers

Details

Summary

This allows to remove one M_NOWAIT allocation and also makes it
more clear what's going on.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note: this patch is a step towards D35303.

sys/kern/uipc_usrreq.c
1169

Why NOWAIT?

glebius added inline comments.
sys/kern/uipc_usrreq.c
1169

Because in most cases a kernel thread can't sleep here.

markj added inline comments.
sys/kern/uipc_usrreq.c
1187

I would assert from->sa_len <= MLEN here. Should be ok because sizeof(struct sockaddr_un) is smaller than MLEN, but that could be false in some exotic situations. (Sometimes one adds extra fields to struct mbuf for debugging purposes.)

This revision is now accepted and ready to land.May 25 2022, 7:04 PM
This revision now requires review to proceed.May 31 2022, 4:36 PM

Rebase, variable rename. No functional changes.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 24 2022, 4:11 PM
This revision was automatically updated to reflect the committed changes.