Re: [PATCH RFC] make reading /proc/mounts consistent

From: Jamie Lokier
Date: Wed Jun 06 2012 - 23:11:39 EST


Vladimir Davydov wrote:
> >> This is achieved by keeping the position where a process stopped as a
> >> pointer to mount entry and resuming reading from the position. If a mount entry
> >> is removed, all processes that stopped on the entry are advanced i.e. their
> >> position is moved to the next entry. To achieve this, all processes reading
> >> /proc/mounts are organized in a linked list.
> >>
> >> An example of /proc/mounts inconsistency is here:
> >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593516
> >
> > In the specific case of schroot I'm not convinced that you shouldn't
> > just increase the user space buffer size if you don't read everything.
> > Or to simply use mount namespaces to make unmounting unnecessary.
>
> I agree, but there may be a lot of programs that already read
> /proc/mounts and don't care about its consistency.

I have cared about its consistency, but didn't realise it didn't
provide it. Oops! I will use a bigger buffer in future, thanks for
pointing it out ;-)

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