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
F102942271: D36127.diff
Tue, Nov 19, 1:06 AM
Unknown Object (File)
Sun, Nov 10, 9:47 PM
Unknown Object (File)
Oct 9 2024, 12:05 PM
Unknown Object (File)
Sep 30 2024, 1:39 PM
Unknown Object (File)
Sep 21 2024, 3:24 PM
Unknown Object (File)
Sep 21 2024, 2:41 AM
Unknown Object (File)
Sep 20 2024, 5:34 PM
Unknown Object (File)
Sep 18 2024, 5:15 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.