lkml.org 
[lkml]   [2011]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2011-06-03 20:57    [W:0.049 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site