Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Sep 2014 00:11:01 +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-8@freebsd.org
Subject:   svn commit: r271654 - stable/8/sys/netinet/cc
Message-ID:  <201409160011.s8G0B1uQ096566@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lstewart
Date: Tue Sep 16 00:11:01 2014
New Revision: 271654
URL: http://svnweb.freebsd.org/changeset/base/271654

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>

Modified:
  stable/8/sys/netinet/cc/cc_cdg.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/cc/cc_cdg.c
==============================================================================
--- stable/8/sys/netinet/cc/cc_cdg.c	Tue Sep 16 00:04:38 2014	(r271653)
+++ stable/8/sys/netinet/cc/cc_cdg.c	Tue Sep 16 00:11:01 2014	(r271654)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409160011.s8G0B1uQ096566>