Re: [AppArmor 31/41] Fix __d_path() for lazy unmounts and make it unambiguous; exclude unreachable mount points from /proc/mounts

Alan Cox
2007-04-12T09:56:18Z

> Third, sys_getcwd() shouldn't return disconnected paths. The patch checks for
> that, and makes it fail with -ENOENT in that case

That is a fairly significant and sudden change to the existing
kernel/user interface.

> Fourth, this now allows us to tell unreachable mount points from reachable
> ones when generating the /proc/mounts and /proc/$pid/mountstats files.
> Unreachable mount points are not interesting to processes (they can't get
> there, anyway), so we hide unreachable mounts. In particular, ordinary

This is untrue. The process can get there (via fd passing with another
task) and the process can be producing output for the human operators,
who most definitely need to know and see this stuff.

> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
> Reviewed-by: NeilBrown <neilb@suse.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

I don't think this is fit to apply in current form. The hiding of mounts
and mountstats is the wrong approach. The changes to getcwd behaviour
bother me too as we are changing user space behaviour without warning.

The general idea of pushing some of the fail detect logic into __d_path()
seems good though.

Alan