Page MenuHomeFreeBSD

Fix reference count leak with L2 caching.
ClosedPublic

Authored by karels on Mar 20 2017, 12:27 AM.
Tags
None
Referenced Files
F103563951: D10059.diff
Tue, Nov 26, 1:58 PM
Unknown Object (File)
Sun, Nov 10, 3:05 PM
Unknown Object (File)
Fri, Nov 8, 4:15 AM
Unknown Object (File)
Tue, Nov 5, 7:26 PM
Unknown Object (File)
Oct 16 2024, 2:15 PM
Unknown Object (File)
Oct 16 2024, 2:15 PM
Unknown Object (File)
Oct 16 2024, 2:15 PM
Unknown Object (File)
Oct 16 2024, 1:52 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.