HomeFreeBSD

Make sure the locally cached value of rt->rt_gateway stays stable,

Description

Make sure the locally cached value of rt->rt_gateway stays stable,
even after dropping the reference and unlocking. Previously we
have dereferenced a NULL pointer (after r121765).
Simply unlocking after the block does not work either because of
lock ordering (see r121765) and in addition we would still hold
a pointer to something that might be gone by the time we access it.
Thus take a copy of the value rather than just caching the pointer.

PR: kern/151908
Submitted by: chenyl (netstar2008 126.com) (initial version)
MFC after: 2 weeks

Details

Provenance
bzAuthored on Mar 12 2011, 9:41 AM
Parents
rG308bce2a0ed1: add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
Branches
Unknown
Tags
Unknown

Event Timeline