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)
Thu, Aug 13, 12:37 PM
Unknown Object (File)
Sat, Aug 8, 6:17 PM
Unknown Object (File)
Tue, Aug 4, 6:20 AM
Unknown Object (File)
Sat, Aug 1, 12:16 PM
Unknown Object (File)
Mon, Jul 20, 11:59 PM
Unknown Object (File)
Jun 26 2026, 6:56 AM
Unknown Object (File)
Jun 26 2026, 5:01 AM
Unknown Object (File)
Jun 3 2026, 11:25 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