| 560 | } |
| 561 | |
| 562 | static void |
| 563 | tcp_remove_hpts_ref(struct inpcb *inp, struct tcp_hpts_entry *hpts, int line) |
| 564 | { |
| 565 | int32_t add_freed; |
| 566 | |
| 567 | if (inp->inp_flags2 & INP_FREED) { |
| 568 | /* |
| 569 | * Need to play a special trick so that in_pcbrele_wlocked |
| 570 | * does not return 1 when it really should have returned 0. |
| 571 | */ |
| 572 | add_freed = 1; |
| 573 | inp->inp_flags2 &= ~INP_FREED; |
| 574 | } else { |
| 575 | add_freed = 0; |
| 576 | } |
| 577 | #ifndef INP_REF_DEBUG |
| 578 | if (in_pcbrele_wlocked(inp)) { |
| 579 | /* |
| 580 | * This should not happen. We have the inpcb referred to by |
| 581 | * the main socket (why we are called) and the hpts. It |
| 582 | * should always return 0. |
| 583 | */ |
| 584 | panic("inpcb:%p release ret 1", |
| 585 | inp); |
| 586 | } |
| 587 | #else |
| 588 | if (__in_pcbrele_wlocked(inp, line)) { |
| 589 | /* |
| 590 | * This should not happen. We have the inpcb referred to by |
| 591 | * the main socket (why we are called) and the hpts. It |
| 592 | * should always return 0. |
| 593 | */ |
| 594 | panic("inpcb:%p release ret 1", |
| 595 | inp); |
| 596 | } |
| 597 | #endif |
| 598 | if (add_freed) { |
| 599 | inp->inp_flags2 |= INP_FREED; |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | static void |
| 604 | tcp_hpts_remove_locked_output(struct tcp_hpts_entry *hpts, struct inpcb *inp, int32_t flags, int32_t line) |
no test coverage detected