[CRIU] [PATCH 3/7] files-reg: Allocate the complete ghost file structure in shared memory

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 5 14:54:24 EST 2012


On Wed, Dec 05, 2012 at 11:47:49PM +0400, Pavel Emelyanov wrote:
> On 12/03/2012 07:27 PM, Cyrill Gorcunov wrote:
> > Inotify will need to have an ability to access path generated for
> > ghost files thus we need this item being shared.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  files-reg.c | 7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> Why do we need the path string in shared memory?

Because we might need access the path from another process.
Say task 1 opens file, then forks then task 2 hooks a watch
on it and then task 1 deletes it.


More information about the CRIU mailing list