Module Name:    src
Committed By:   para
Date:           Fri Jun  2 19:10:19 UTC 2017

Modified Files:
        src/sys/netinet: wqinput.c

Log Message:
pool_init does not copy its name argument
therefore don't pass in a stack allocated buffer

vmstat -mv shows pool(s) with broken name(s)

use the name argument passed into wqinput_create directly
which is a static string in all 4 callee cases

(workqueue_create/workqueue_init copies the name argument)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/netinet/wqinput.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/wqinput.c
diff -u src/sys/netinet/wqinput.c:1.2 src/sys/netinet/wqinput.c:1.3
--- src/sys/netinet/wqinput.c:1.2	Sun May 21 08:36:22 2017
+++ src/sys/netinet/wqinput.c	Fri Jun  2 19:10:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: wqinput.c,v 1.2 2017/05/21 08:36:22 ozaki-r Exp $	*/
+/*	$NetBSD: wqinput.c,v 1.3 2017/06/02 19:10:19 para Exp $	*/
 
 /*-
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -160,7 +160,7 @@ wqinput_create(const char *name, void (*
 	if (error != 0)
 		panic("%s: workqueue_create failed (%d)\n", __func__, error);
 	pool_init(&wqi->wqi_work_pool, sizeof(struct wqinput_work), 0, 0, 0,
-	    namebuf, NULL, IPL_SOFTNET);
+	    name, NULL, IPL_SOFTNET);
 	wqi->wqi_worklists = percpu_alloc(sizeof(struct wqinput_worklist));
 	wqi->wqi_input = func;
 

Reply via email to