Author: lstewart Date: Tue Sep 16 00:04:38 2014 New Revision: 271653 URL: http://svnweb.freebsd.org/changeset/base/271653
Log: MFC r270160: Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload panic easily triggered by running "sysctl -a" after unload. Reported and tested by: Grenville Armitage <garmit...@swin.edu.au> Modified: stable/9/sys/netinet/cc/cc_cdg.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/cc/cc_cdg.c ============================================================================== --- stable/9/sys/netinet/cc/cc_cdg.c Mon Sep 15 23:43:01 2014 (r271652) +++ stable/9/sys/netinet/cc/cc_cdg.c Tue Sep 16 00:04:38 2014 (r271653) @@ -226,6 +226,7 @@ static VNET_DEFINE(uint32_t, cdg_hold_ba /* Function prototypes. */ static int cdg_mod_init(void); +static int cdg_mod_destroy(void); static void cdg_conn_init(struct cc_var *ccv); static int cdg_cb_init(struct cc_var *ccv); static void cdg_cb_destroy(struct cc_var *ccv); @@ -239,7 +240,8 @@ struct cc_algo cdg_cc_algo = { .cb_destroy = cdg_cb_destroy, .cb_init = cdg_cb_init, .conn_init = cdg_conn_init, - .cong_signal = cdg_cong_signal + .cong_signal = cdg_cong_signal, + .mod_destroy = cdg_mod_destroy }; /* Vnet created and being initialised. */ @@ -283,6 +285,14 @@ cdg_mod_init(void) } static int +cdg_mod_destroy(void) +{ + + uma_zdestroy(qdiffsample_zone); + return (0); +} + +static int cdg_cb_init(struct cc_var *ccv) { struct cdg *cdg_data; _______________________________________________ svn-src-stable-9@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"