Move all data required for data transfer into new struct gre_priv
and make it allocation and reclamation using network epoch.
This also should fix PR 275474.
Differential D55398
if_gre: make access to softc's data safe in network epoch Authored by ae on Fri, Feb 20, 2:42 PM.
Details
Diff Detail
Event TimelineComment Actions When you issue ioctl that does some changes in softc, another thread can do transmission in the same time and use some data from softc.
I think that's how it happened historically, for some interfaces we have different files of INET and INET6 implementation. Comment Actions Ahh, I think I see what's happening. While some time ago I was trying to diagnose PR 275474, I observed UAF and got messed up in mind. So if it is obvious that the fast path is still accessing some ifnet private data ( socket in gre softc ), I think the quick fix should be signaling the fast path that the interface is going to be re-configured ? |