Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet pool_init does not copy its name argument
details: https://anonhg.NetBSD.org/src/rev/8d923c9cd2c1
branches: trunk
changeset: 354055:8d923c9cd2c1
user: para <para%NetBSD.org@localhost>
date: Fri Jun 02 19:10:19 2017 +0000
description:
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)
diffstat:
sys/netinet/wqinput.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 51b06630cde7 -r 8d923c9cd2c1 sys/netinet/wqinput.c
--- a/sys/netinet/wqinput.c Fri Jun 02 18:19:33 2017 +0000
+++ b/sys/netinet/wqinput.c Fri Jun 02 19:10:19 2017 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index