Page MenuHomeFreeBSD

inpcb: remove extraneous check in inp_next()
AbandonedPublic

Authored by glebius on Mar 4 2026, 9:39 PM.
Tags
None
Referenced Files
F163199442: D55660.diff
Mon, Jul 20, 11:59 PM
Unknown Object (File)
Fri, Jun 26, 6:56 AM
Unknown Object (File)
Fri, Jun 26, 5:01 AM
Unknown Object (File)
Jun 3 2026, 11:25 AM
Unknown Object (File)
May 24 2026, 6:08 PM
Unknown Object (File)
May 9 2026, 7:35 PM
Unknown Object (File)
Apr 18 2026, 7:34 AM
Unknown Object (File)
Apr 16 2026, 10:37 AM

Details

Reviewers
markj
Group Reviewers
network
Summary

The condition of the embracing for(;;) loop is the same.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71186
Build 68069: arc lint + arc unit

Event Timeline

pouria added inline comments.
sys/netinet/in_pcb.c
1601

Is it possible for inp to become NULL here first, and then for the for loop to attempt to update inp by assigning II_LIST_NEXT(**NULL**, hash) here?

sys/netinet/in_pcb.c
1601

I mean, theorically, for loop will update the variable first and then it will test its condition.
I don't think if II_LIST_NEXT can tolerate NULL input as its argument.
since it'll call the CK_LIST_NEXT macro and it will dereference inp to find its next element: &(NULL)->field.cle_next