From e20d9c3503b1e427046047a1801d7e1985d9e99b Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 26 Jun 2009 21:24:34 +0000 Subject: voicebus: Limit the string length of the vpm workqueue name. On older kernels, it is possible to cause a kernel panic if the lenght of the workqueue name is greater than 10. DAHDI-276. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6776 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/voicebus/GpakCust.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/dahdi/voicebus') diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c index dbce49b..b3228df 100644 --- a/drivers/dahdi/voicebus/GpakCust.c +++ b/drivers/dahdi/voicebus/GpakCust.c @@ -403,8 +403,13 @@ vpmadt032_alloc(struct vpmadt032_options *options, const char *board_name) if (!vpm) return NULL; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) + /* There is a limit on the length of the name of the workqueue. */ + strcpy(vpm->wq_name, "vpmadt032"); +#else strcpy(vpm->wq_name, board_name); strcat(vpm->wq_name, suffix); +#endif /* Init our vpmadt032 struct */ memcpy(&vpm->options, options, sizeof(*options)); -- cgit v1.2.3