diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-06-26 21:24:34 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-06-26 21:24:34 +0000 |
commit | e20d9c3503b1e427046047a1801d7e1985d9e99b (patch) | |
tree | 8fcafe9c56c6308d21a382be718608b6a459a8e5 /drivers/dahdi/voicebus | |
parent | 02ac882d037f13beac1179ac202c0f147dedd539 (diff) |
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
Diffstat (limited to 'drivers/dahdi/voicebus')
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)); |