lkml.org 
[lkml]   [1996]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: /proc/<pid>/mem unreadable
Date
> 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    [W:0.056 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site