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
F97644517: D36127.diff
Mon, Sep 30, 1:39 PM
Unknown Object (File)
Sat, Sep 21, 3:24 PM
Unknown Object (File)
Sat, Sep 21, 2:41 AM
Unknown Object (File)
Fri, Sep 20, 5:34 PM
Unknown Object (File)
Wed, Sep 18, 5:15 AM
Unknown Object (File)
Tue, Sep 17, 12:09 AM
Unknown Object (File)
Mon, Sep 16, 9:17 AM
Unknown Object (File)
Sun, Sep 15, 9:18 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
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.