Page MenuHomeFreeBSD

tcp: add asserts and safety in case no CC module is attached
Needs RevisionPublic

Authored by rscheff on Feb 11 2024, 5:23 PM.
Referenced Files
Unknown Object (File)
Mon, Apr 8, 11:50 PM
Unknown Object (File)
Mon, Apr 8, 10:34 PM
Unknown Object (File)
Fri, Apr 5, 8:08 AM
Unknown Object (File)
Mon, Mar 25, 10:39 PM
Unknown Object (File)
Tue, Mar 19, 4:37 AM
Unknown Object (File)
Tue, Mar 19, 2:40 AM
Unknown Object (File)
Feb 17 2024, 6:46 AM
Unknown Object (File)
Feb 13 2024, 5:12 AM


Group Reviewers

While further troubleshooting PR276761, i encountered one instance
where the CC algo was gone already, when a retransmission timeout
timer fired. While that shouldn't happen, i think it's prudent
to not blindly follow potential NULL pointers when calling CC

The impact of checking the pointer should be minimal in all these instances.

[2475.559032] calltrap() at calltrap+0x8/frame 0xfffffe00ce8aac80
[2475.581285] --- trap 0xc, rip = 0xffffffff80d474c0, rsp = 0xfffffe00ce8aad50, rbp = 0xfffffe00ce8aad70 ---
[2475.603529] cc_cong_signal() at cc_cong_signal+0x1e0/frame 0xfffffe00ce8aad70
[2475.628033] tcp_timer_rexmt() at tcp_timer_rexmt+0x66b/frame 0xfffffe00ce8aadd0
[2475.651720] tcp_timer_enter() at tcp_timer_enter+0x15e/frame 0xfffffe00ce8aae10

(tp->t_cc was NULL)

Diff Detail

rG FreeBSD src repository
Lint Passed
No Test Coverage
Build Status
Buildable 55941
Build 52830: arc lint + arc unit

Event Timeline

I think we should find the cause, where the CC module gone...

I agree we should rootcase the case. However - why do we need to perform these conditional checks everywhere?
Why can’t t_cc refer to the dummy cc structure? Why can’t the non-implemented/non-needed function point to no-op functions?

glebius requested changes to this revision.Feb 12 2024, 4:27 PM

Yes, we need to find the root cause instead. The patch can be used as a temporary solution for the bug report user affected.

This revision now requires changes to proceed.Feb 12 2024, 4:27 PM