summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ngctl/list.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-02-09 15:14:44 +0000
committerru <ru@FreeBSD.org>2005-02-09 15:14:44 +0000
commitdda796bcd3a9f1cb5ed0c163b5dcaed61b9658d5 (patch)
treef487cd95b7aeab254d43385c3ffbff14b77423e2 /usr.sbin/ngctl/list.c
parent9c4d6c630780a10d60c9151a1071d073086d7221 (diff)
downloadFreeBSD-src-dda796bcd3a9f1cb5ed0c163b5dcaed61b9658d5.zip
FreeBSD-src-dda796bcd3a9f1cb5ed0c163b5dcaed61b9658d5.tar.gz
In revision 1.29 timeout() was converted to ng_callout().
The difference is that the callout function installed via the ng_callout() method is guaranteed to NOT fire after the shutdown method was run (when a node is marked NGF_INVALID). Also, the shutdown method and the callout function are guaranteed to NOT run at the same time, as both require the writer lock. Thus we can safely ignore a zero return value from ng_uncallout() (callout_stop()) in shutdown methods, and go on with freeing the node. The said revision broke the node shutdown -- ng_bridge_timeout() is no longer fired after ng_bridge_shutdown() was run, resulting in a memory leak, dead nodes, and inability to unload the module. Fix this by cancelling the callout on shutdown, and moving part responsible for freeing a node resources from ng_bridge_timer() to ng_bridge_shutdown(). Noticed by: ru Submitted by: glebius, ru
Diffstat (limited to 'usr.sbin/ngctl/list.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud