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
F82126158: D36127.diff
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
Unknown Object (File)
Feb 19 2024, 1:23 PM
Unknown Object (File)
Dec 22 2023, 10:40 PM
Unknown Object (File)
Dec 12 2023, 10:45 AM
Unknown Object (File)
Dec 3 2023, 8:35 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.