Hi David,
Haha -- you sent this just as I'd come up with the same patch here.
:-)
With these changes, alongside the rt->dev == NULL in
mctp_route_release() crash fix mentioned in [1], the tests all pass
on
my system. (They also pass under KASAN, which bodes well.)
Awesome, thanks for checking these out. I've since sent a v2 with the
fixes integrated, in order to not break davem's build.
I've refined the rt->dev == NULL case a little; rather than allowing
->dev == NULL in the core code (which should never happen), I've
modified the test's route refcounting so that the route destroy path
should only ever hit the test's own destructor instead (which allows
!rt->dev cases). This means we can keep the ->dev != NULL assumption in
the core, and still handle tests where our fake route->dev is unset.
Cheers,
Jeremy