Messages in this thread | | | Date | Fri, 3 Jun 2011 13:54:41 -0500 | From | Timur Tabi <> | Subject | Re: [PATCH] lib: introduce strdup_from_user |
| |
Alexey Dobriyan wrote: > It leaks first allocation if second one fails. > > Come on.
Ugh, sorry. In my defense, I am suffering from allergies at the moment.
> Show you user in driver, maybe what we're discussing is moot.
The driver and discussion on it can be found here:
http://patchwork.ozlabs.org/patch/98233/
Search for "ioctl_dtprop" to see its usage.
In summary, I'm copying a user-space string into a kmalloc'd buffer so that it's physically contiguous and I can get the physical address for it. I then call our hypervisor and give it the physical address. This is why I want a copy of the string in a buffer allocated via kmalloc.
-- Timur Tabi Linux kernel developer at Freescale
| |