# Re: \[PATCH v15 6/9\] namei: LOOKUP\_{IN\_ROOT,BENEATH}: permit limited ".." resolution

- From: Aleksa Sarai \<hidden\>
- Date: 2019-11-13 07:53:07 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2019/11/166692
- Thread: https://ratatoskr.run/linux-alpha/2019/11/166181/t.md

```text
On 2019-11-13, Al Viro [ref] wrote:
> On Tue, Nov 05, 2019 at 08:05:50PM +1100, Aleksa Sarai wrote:
> 
> > One other possible alternative (which previous versions of this patch
> > used) would be to check with path_is_under() if there was a racing
> > rename or mount (after re-taking the relevant seqlocks). While this does
> > work, it results in possible O(n*m) behaviour if there are many renames
> > or mounts occuring *anywhere on the system*.
> 
> BTW, do you realize that open-by-fhandle (or working nfsd, for that matter)
> will trigger arseloads of write_seqlock(&rename_lock) simply on d_splice_alias()
> bringing disconnected subtrees in contact with parent?

I wasn't aware of that -- that makes path_is_under() even less viable.
I'll reword it to be clearer that path_is_under() isn't a good idea and
why we went with -EAGAIN over an in-kernel retry.

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-api/2019/11/166692/attachment/0) (application/pgp-signature, 228 bytes)
