Page MenuHomeFreeBSD

dummynet: do not store struct ifnet pointers
ClosedPublic

Authored by kp on May 19 2022, 5:00 PM.
Tags
None
Referenced Files
F133997594: D35256.id106167.diff
Wed, Oct 29, 10:01 PM
F133965573: D35256.id.diff
Wed, Oct 29, 4:03 PM
F133952192: D35256.id106203.diff
Wed, Oct 29, 1:46 PM
F133952087: D35256.id106167.diff
Wed, Oct 29, 1:45 PM
F133952030: D35256.diff
Wed, Oct 29, 1:44 PM
Unknown Object (File)
Fri, Oct 10, 11:03 PM
Unknown Object (File)
Fri, Oct 10, 11:02 PM
Unknown Object (File)
Fri, Oct 10, 11:02 PM

Details

Summary

The dn_pkt_tag tag contained a struct ifnet pointer. If we persist that
across NET_EPOCH boundaries (as we did in dummynet) we risk panics if
the interface is removed between the packet being enqueued and it being
dequeued.

Convert the pointer into an index/generation pair and restore it when
the packet is taken out of the queue.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable