From bb9952a07ee018c887e71f74b8527359bf4821ad Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 3 Aug 2005 23:58:08 +0000 Subject: [PATCH] use vmalloc instead of kmalloc in do_devconfig_ioctl() in order to accommodate large firmware uploads (pci-6534). --- comedi/comedi_fops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index b53ed544..c8dc9b9a 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -174,12 +174,12 @@ static int do_devconfig_ioctl(comedi_device *dev,comedi_devconfig *arg, unsigned aux_len = it.options[COMEDI_DEVCONF_AUX_DATA_LENGTH]; if(aux_len<0)return -EFAULT; - aux_data = kmalloc(aux_len, GFP_KERNEL); - if(!aux_data)return -EFAULT; + aux_data = vmalloc(aux_len); + if(!aux_data) return -ENOMEM; if(copy_from_user(aux_data, comedi_aux_data(it.options, 0), aux_len)){ - kfree(aux_data); + vfree(aux_data); return -EFAULT; } it.options[COMEDI_DEVCONF_AUX_DATA_LO] = (unsigned long)aux_data; @@ -193,7 +193,7 @@ static int do_devconfig_ioctl(comedi_device *dev,comedi_devconfig *arg, unsigned ret = comedi_device_attach(dev,&it); - if(aux_data) kfree(aux_data); + if(aux_data) vfree(aux_data); return ret; } -- 2.26.2