diff options
author | bz <bz@FreeBSD.org> | 2011-03-12 09:41:25 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2011-03-12 09:41:25 +0000 |
commit | d94569d0eda2904ae51ce50a17605f48f94fff76 (patch) | |
tree | be892239ac63ab1a676bad629496bc5f01134975 /lib/libc/stdio/putchar.c | |
parent | 8b9accae99ebde19a9f203d97a1f1fc163d951e7 (diff) | |
download | FreeBSD-src-d94569d0eda2904ae51ce50a17605f48f94fff76.zip FreeBSD-src-d94569d0eda2904ae51ce50a17605f48f94fff76.tar.gz |
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
Diffstat (limited to 'lib/libc/stdio/putchar.c')
0 files changed, 0 insertions, 0 deletions