Messages in this thread | | | Subject | Re: [git pull] apparmor fix for __d_path() misuse | From | Tetsuo Handa <> | Date | Wed, 07 Dec 2011 14:44:33 +0900 |
| |
Al Viro wrote: > > So, can we keep behavior of tomoyo_get_absolute_path() unchanged? > > Sure, you are always free to add > if (pos == ERR_PTR(-EINVAL)) { > pos = dentry_path(path->dentry, ...) > /* do whatever you want to buffer to indicate that > * beginning had been lost > */ > }
Maybe I can call tomoyo_get_local_path() if tomoyo_get_absolute_path() failed with -EINVAL.
> Or you might want to do __d_path() from (path->mnt,path->mnt->mnt_root) to > path - that's the path from the last mountpoint to your object; i.e. it may > be shorter if that vfsmount had been a binding into the guts of filesystem, > but that is what __d_path() as you used it would stabilize to once the race > window is over.
Excuse me, what "once the race window is over" means? Does
do { pos = d_absolute_path(path, buffer, buflen - 1); } while (pos == ERR_PTR(-EINVAL));
work (i.e. racing with "umount -l" is a temporary failure)?
| |