svn commit: r271690 - stable/10/sys/netinet/cc
Lawrence Stewart
lstewart at FreeBSD.org
Tue Sep 16 21:26:25 UTC 2014
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 at 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;
More information about the svn-src-stable-10
mailing list