From 2c8d4f610607df5ac623e44afb81a6bc209c1bf0 Mon Sep 17 00:00:00 2001 From: para Date: Fri, 2 Jun 2017 19:10:19 +0000 Subject: [PATCH] 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) --- sys/netinet/wqinput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/wqinput.c b/sys/netinet/wqinput.c index 15f7c4860f27..1faf6603df5e 100644 --- a/sys/netinet/wqinput.c +++ b/sys/netinet/wqinput.c @@ -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 (*func)(struct mbuf *, int, int)) 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;