Page MenuHomeFreeBSD

dummynet: do not store struct ifnet pointers
ClosedPublic

Authored by kp on May 19 2022, 5:00 PM.
Tags
None
Referenced Files
F163218566: D35256.id106167.diff
Tue, Jul 21, 4:06 AM
Unknown Object (File)
Mon, Jul 20, 8:50 AM
Unknown Object (File)
Mon, Jul 20, 12:27 AM
Unknown Object (File)
Sun, Jul 19, 6:30 PM
Unknown Object (File)
Tue, Jul 7, 6:07 AM
Unknown Object (File)
Fri, Jul 3, 5:30 AM
Unknown Object (File)
Thu, Jul 2, 6:18 PM
Unknown Object (File)
Wed, Jul 1, 8:47 AM

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