Date: Tue, 16 Sep 2014 21:26:25 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271690 - stable/10/sys/netinet/cc Message-ID: <201409162126.s8GLQP1C097599@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lstewart Date: Tue Sep 16 21:26:24 2014 New Revision: 271690 URL: http://svnweb.freebsd.org/changeset/base/271690 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 <garmitage@swin.edu.au> Approved by: re(gjb) Modified: stable/10/sys/netinet/cc/cc_cdg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/cc/cc_cdg.c ============================================================================== --- stable/10/sys/netinet/cc/cc_cdg.c Tue Sep 16 20:48:13 2014 (r271689) +++ stable/10/sys/netinet/cc/cc_cdg.c Tue Sep 16 21:26:24 2014 (r271690) @@ -221,6 +221,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); @@ -234,7 +235,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. */ @@ -278,6 +280,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409162126.s8GLQP1C097599>