lkml.org 
[lkml]   [2011]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [git pull] apparmor fix for __d_path() misuse
From
Date
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)?


\
 
 \ /
  Last update: 2011-12-07 06:47    [W:0.060 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site