Page MenuHomeFreeBSD

Fix reference count leak with L2 caching.
ClosedPublic

Authored by karels on Mar 20 2017, 12:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 1:50 AM
Unknown Object (File)
Jan 13 2024, 3:43 AM
Unknown Object (File)
Dec 20 2023, 2:58 AM
Unknown Object (File)
Nov 9 2023, 12:34 PM
Unknown Object (File)
Nov 8 2023, 6:29 PM
Unknown Object (File)
Oct 8 2023, 11:31 AM
Unknown Object (File)
Oct 7 2023, 5:21 PM
Unknown Object (File)
Sep 14 2023, 8:11 PM
Subscribers

Details

Summary

ip_forward, TCP/IPv6, and probably SCTP leaked references to L2 cache
entry because they used their own routes on the stack, not in_pcb routes.
The original model for route caching was callers that provided a route
structure to ip{,6}input() would keep the route, and this model was used
for L2 caching as well. Instead, change L2 caching to be done by default
only when using a route structure in the in_pcb; the pcb deallocation
code frees L2 as well as L3 cacches. A separate change will add route
caching to TCP/IPv6.

Another suggestion was to have the transport protocols indicate willingness
to use L2 caching, but this approach keeps the changes in the network
level

Test Plan

Tested with kgdb to verify cache operation and proper freeing of lle's.
Will ask original reporter to confirm.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is something that I mean when said about setting RT_LLE_CACHE flags in the TCP/UDP code. This even looks better.

This revision is now accepted and ready to land.Mar 20 2017, 8:05 AM
This revision was automatically updated to reflect the committed changes.