Page MenuHomeFreeBSD

raw ip: merge rip_output() into rip_send()
ClosedPublic

Authored by glebius on Aug 10 2022, 11:51 PM.
Tags
None
Referenced Files
F83061721: D36127.diff
Sun, May 5, 6:33 PM
Unknown Object (File)
Thu, May 2, 4:38 AM
Unknown Object (File)
Thu, May 2, 4:38 AM
Unknown Object (File)
Thu, May 2, 4:38 AM
Unknown Object (File)
Thu, Apr 25, 7:10 PM
Unknown Object (File)
Feb 19 2024, 6:24 PM
Unknown Object (File)
Feb 19 2024, 6:24 PM
Unknown Object (File)
Feb 19 2024, 6:24 PM
Subscribers

Details

Summary

While here, address the unlocked 'dst' read. Solve that by storing
a pointer either to the inpcb or to the sockaddr. If we end up
copying address out of the inpcb, that would be done under the read
lock section.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsys/netinet/raw_ip.c:410SPELL1Possible Spelling Mistake
Warningsys/netinet/raw_ip.c:429SPELL1Possible Spelling Mistake
Warningsys/netinet/raw_ip.c:436SPELL1Possible Spelling Mistake
Warningsys/netinet/raw_ip.c:438SPELL1Possible Spelling Mistake
Warningsys/netinet/raw_ip.c:440SPELL1Possible Spelling Mistake
Warningsys/netinet/raw_ip.c:448SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 46844
Build 43733: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Aug 11 2022, 8:40 AM
sys/netinet/raw_ip.c
434

Q: why do we store reference instead of just saving the value?

glebius added inline comments.
sys/netinet/raw_ip.c
434

At this point inp isn't locked. On the copyout it will be locked. Well, inp_faddr can not change, I believe. But reading value out in the locked section, kinda more cool.

This revision was landed with ongoing or failed builds.Aug 11 2022, 4:20 PM
This revision was automatically updated to reflect the committed changes.
glebius marked an inline comment as done.