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)
This commit is contained in:
parent
bdc5add69f
commit
2c8d4f6106
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue