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

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.095 / U:2.052 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site