lkml.org 
[lkml]   [2003]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pivot_root seems to be broken in 2.4.21-ac4 and 2.4.22-pre7
Jason Baron wrote:
> right. so the semantics of how file tables are shared has changed a bit. I
> would think that for at least 'init', it'd be nice to preserve the
> original behavior, for situations such as you described. Something like
> the following would probably work, although i havent' tried the test
> script.
>
> --- linux/kernel/fork.c.orig 2003-07-23 21:34:59.000000000 -0400
> +++ linux/kernel/fork.c 2003-07-23 21:35:45.000000000 -0400
> @@ -558,7 +558,7 @@ int unshare_files(void)
>
> /* This can race but the race causes us to copy when we don't
> need to and drop the copy */
> - if(atomic_read(&files->count) == 1)
> + if(atomic_read(&files->count) == 1 || (current->pid == 1))
> {
> atomic_inc(&files->count);
> return 0;

Thanks for the hint ! I will try that in the evening. Any chance that
this will be in 2.4.22 final ?

best regards,
Rene



-
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:47    [from the cache]
©2003-2011 Jasper Spaans