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)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:18 AM
Unknown Object (File)
Feb 22 2024, 7:53 AM
Unknown Object (File)
Jan 28 2024, 10:54 PM
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.