lkml.org 
[lkml]   [1996]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
FromAlan Cox <>
SubjectRe: /proc/<pid>/mem unreadable
DateWed, 8 May 1996 09:49:51 +0100 (BST)
> The best solution is, I believe, to validate the request at
> read-time instead of open-time.

Be very careful that you don't do


if(request_valid(x))
{
memcpy_tofs(....)

as the paging of the process could sleep and cause the data to be copied
from the new task I think. It might need


if(request_valid(x))
{
memcpy_tofs(....)
if(!request_valid(x))
memset(..,0,...)
}
Alan



\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2010