Page MenuHomeFreeBSD

inpcb: remove extraneous check in inp_next()
AbandonedPublic

Authored by glebius on Mar 4 2026, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 7:34 AM
Unknown Object (File)
Thu, Apr 16, 10:37 AM
Unknown Object (File)
Wed, Apr 15, 10:12 AM
Unknown Object (File)
Wed, Apr 15, 4:06 AM
Unknown Object (File)
Wed, Apr 15, 12:20 AM
Unknown Object (File)
Sat, Apr 11, 2:29 AM
Unknown Object (File)
Wed, Apr 1, 9:59 AM
Unknown Object (File)
Mar 25 2026, 7:11 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