lkml.org 
[lkml]   [2002]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQuestion about copy_from/copy_to
I'm trying to write a device driver (module) for one of my customers and 
have the following problem.

kernel veraion 2.4.18...

Memory is allocated (kmalloc) in the "open" call.

The above memory is used in copy_from/to in the "ioctl" (and possibly
the read/write) call.

I understand that the copy_from/to may wait for pages to be swapped in,
If the waiting process is killed at this point, is it safe to free the
memory in the "close/release" call? If not, when is it safe to call kfree?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.030 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site