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

From: Alan Cox
Date: Thu Apr 12 2007 - 05:56:46 EST


> 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@xxxxxxx>
> Reviewed-by: NeilBrown <neilb@xxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

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
-
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/